Re: query planner and scanning methods

Поиск
Список
Период
Сортировка
От Richard Broersma
Тема Re: query planner and scanning methods
Дата
Msg-id 396486430809241222x65c13e33j80f8c0fc7c6e7039@mail.gmail.com
обсуждение исходный текст
Ответ на Re: query planner and scanning methods  ("Richard Broersma" <richard.broersma@gmail.com>)
Список pgsql-performance
On Tue, Sep 23, 2008 at 3:57 PM, Richard Broersma
<richard.broersma@gmail.com> wrote:
> SELECT A."dimension_book"."call", SUM( B."dimension_book"."call" ) AS
> OrderedRowNbr
> FROM ( your_above_query_without_the_limits ) AS A
> INNER JOIN ( your_above_query_without_the_limits ) AS B
> ON A."dimension_book"."call" >= B."dimension_book"."call"
> ORDER BY A."dimension_book"."call"
> HAVING SUM( A."dimension_book"."call" ) % 10 = 0;

Oops I just noticed that I used sum() where count() should be used and
that I forgot to include the group by clause.  Other than that, I hope
the suggestion was at least halfway helpful.

--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

В списке pgsql-performance по дате отправления:

Предыдущее
От: Axel Rau
Дата:
Сообщение: Re: UFS 2: soft updates vs. gjournal (AKA: Choosing a filesystem 2.)
Следующее
От: Matthew Wakeling
Дата:
Сообщение: Slow index