Re: Spped of max

Поиск
Список
Период
Сортировка
От Jean-Luc Lachance
Тема Re: Spped of max
Дата
Msg-id 3CE26FB7.97AB2704@nsd.ca
обсуждение исходный текст
Ответ на Spped of max  (Edmund Dengler <edmundd@eSentire.com>)
Ответы Re: Spped of max  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Neil Conway wrote:
>[...]
> If you don't have a qualification (i.e. SELECT count(*) FROM x), there
> are a couple ways to do it: use triggers to increment/decrement a
> counter of the number of rows in the table, create a btree-indexed
> SERIAL column and do an ORDER BY serial_column DESC LIMIT 1 on it (note
> that this is fragile, your sequence could easily have holes), or if you
> only need an approximation, you could use the pg_class attribute
> "reltuples" for the OID of your table. My impression is that most
> people choose the first method.
>

The real question is:

Why is reltuples only an approximation?

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

Предыдущее
От: Evgeniy Strokin
Дата:
Сообщение: XML from postgreSQL tables
Следующее
От: Andy DePue
Дата:
Сообщение: Is it better to use OS cache or max out memory usage of PostgreSQL?