Re: Performance aggregates

Поиск
Список
Период
Сортировка
От Nils Zonneveld
Тема Re: Performance aggregates
Дата
Msg-id 3B01633A.D159969C@mbit.nl
обсуждение исходный текст
Ответ на Performance aggregates  (snpe <snpe@infosky.net>)
Ответы Re: Re: Performance aggregates  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general

snpe wrote:
[Snip]

> Query :
>
> select roba,sum(izn)
>  from e_kalkn k,e_kalkns ks
>  where k.id=ks.id
>  group by roba
>  order by roba
>
> is 2.5 times faster on one commercial database (there are tests on Internet
> that say 'Postgresql is faster than that database).
> I can't say which database it is.
>

The 'order by' statement is redundant since you use already 'group by'.
Furthermore you can speed up the query by creating an index on your
'group by' fields (in this case 'roba').

If one database is faster than the other depends on what you test. I've
read that PostgreSQL can be slow with queries that contain a group by,
although I did not experience such thing myself.

HTH,

Nils

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

Предыдущее
От: "Len Morgan"
Дата:
Сообщение: Re: SELECT from a table in another database
Следующее
От: "Trygve Falch"
Дата:
Сообщение: Queries across multiple databases (was: SELECT from a table in another database).