Re: [HACKERS] Much Ado About COUNT(*)

Поиск
Список
Период
Сортировка
От David Garamond
Тема Re: [HACKERS] Much Ado About COUNT(*)
Дата
Msg-id 41E65CC6.8050901@zara.6.isreserved.com
обсуждение исходный текст
Ответы Re: [HACKERS] Much Ado About COUNT(*)  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
Merlin Moncure wrote:
> 6.  for large tables, you can get a pretty accurate count by doing:
> select count(*) * 10 from t where random() > .9;
> on my setup, this shaved about 15% off of the counting time...YMMV.

That's an interesting idea, using sampling to get an estimate.

Thanks for the tip.

--
dave

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

Предыдущее
От: sid tow
Дата:
Сообщение: problem with the select query
Следующее
От: Együd Csaba
Дата:
Сообщение: pgsqlODBC problems