Re: [PERFORM] Slow count(*) again...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PERFORM] Slow count(*) again...
Дата
Msg-id 5100.1296601964@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PERFORM] Slow count(*) again...  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: [PERFORM] Slow count(*) again...  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 02/01/2011 05:47 PM, Bruce Momjian wrote:
>> Tom Lane wrote:
>>> At this point what we've got is 25% of the runtime in nodeAgg.c overhead,
>>> and it's difficult to see how to get any real improvement without tackling
>>> that.

>> Do we want a TODO about optimizing COUNT(*) to avoid aggregate
>> processing overhead?

> Whether or not it's bad application design, it's ubiquitous, and we 
> should make it work as best we can, IMNSHO. This often generates 
> complaints about Postgres, and if we really plan for world domination 
> this needs to be part of it.

I don't think that saving ~25% on COUNT(*) runtime will help that at all.
The people who complain about it expect it to be instantaneous.

If this sort of hack were free, I'd be all for doing it anyway; but I'm
concerned that adding tests to enable a fast path will slow down every
other aggregate, or else duplicate a lot of code that we'll then have to
maintain.
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PERFORM] Slow count(*) again...
Следующее
От: Mladen Gogala
Дата:
Сообщение: Re: [PERFORM] Slow count(*) again...