Re: [PATCHES] Approximate count(*)

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Re: [PATCHES] Approximate count(*)
Дата
Msg-id 125db1c7753893171b6ef46609035de8@biglumber.com
обсуждение исходный текст
Ответ на Re: [PATCHES] Approximate count(*)  (David Fetter <david@fetter.org>)
Ответы Re: [PATCHES] Approximate count(*)  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-docs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


David Fetter wrote:
> Please find enclosed a patch that shows how to get a quick
> approximation of count(*) on a table.

You should mention that ANALYZE will also populate reltuples.

To be real anal, you should say pg_catalog.pg_class too. :)

Tom Lane asked:
>> I'm not sure we should be encouraging people to look at reltuples...
>> for one thing, it's deliberately a moving average under 8.0.

> Should there be more caveats?

Well, it already says "approximate", the value-laden word is "good".
Perhaps if that went away...

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200503242126
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFCQ3iivJuQZxSWSsgRAm+PAKCNJPUl7Xns0kLKvbDjOiuNN2g4agCfbmg+
hX8RHO4R2Ad2fQyCPl+Ha3I=
=2Gal
-----END PGP SIGNATURE-----



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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: [PATCHES] Approximate count(*)
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: [PATCHES] Approximate count(*)