Re: Performance of count(*)

Поиск
Список
Период
Сортировка
От Michael Stone
Тема Re: Performance of count(*)
Дата
Msg-id 20070322141807.GE11402@mathom.us
обсуждение исходный текст
Ответ на Re: Performance of count(*)  (ismo.tuononen@solenovo.fi)
Ответы Re: Performance of count(*)  (mark@mark.mielke.cc)
Re: Performance of count(*)  ("Craig A. James" <cjames@modgraph-usa.com>)
Список pgsql-performance
On Thu, Mar 22, 2007 at 01:30:35PM +0200, ismo.tuononen@solenovo.fi wrote:
>approximated count?????
>
>why? who would need it? where you can use it?

Do a google query. Look at the top of the page, where it says
"results N to M of about O". For user interfaces (which is where a lot
of this count(*) stuff comes from) you quite likely don't care about the
exact count, because the user doesn't really care about the exact count.

IIRC, that's basically what you get with the mysql count anyway, since
there are corner cases for results in a transaction. Avoiding those
cases is why the postgres count takes so long; sometimes that's what's
desired and sometimes it is not.

Mike Stone

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Parallel Vacuum
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: Performance of count(*)