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

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [HACKERS] Much Ado About COUNT(*)
Дата
Msg-id 20050114233745.GH1724@svana.org
обсуждение исходный текст
Ответ на Re: [HACKERS] Much Ado About COUNT(*)  ("Dann Corbit" <DCorbit@connx.com>)
Ответы Re: [HACKERS] Much Ado About COUNT(*)  (Wes <wespvp@syntegra.com>)
Список pgsql-general
On Fri, Jan 14, 2005 at 03:11:32PM -0800, Dann Corbit wrote:
> A cardinality estimate function might be nice.
> SELECT cardinality_estimate(table_name)
> If it is off by 25% then no big deal.
> It would be useful for the PostgreSQL query planner also, I imagine.

If that's all you want, what about the row estimate from pg_class? It
has the number of rows active at last vacuum... For really large tables
I imagine it'd be easily close enough...

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: OID Usage
Следующее
От: Terry Lee Tucker
Дата:
Сообщение: Re: OID Usage