Re: [RFC] speed up count(*)

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: [RFC] speed up count(*)
Дата
Msg-id 4dc52950-06af-9a7c-1d48-e28909f815ec@joeconway.com
обсуждение исходный текст
Ответ на Re: [RFC] speed up count(*)  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [RFC] speed up count(*)
Re: [RFC] speed up count(*)
Список pgsql-hackers
On 10/21/21 4:23 PM, Robert Haas wrote:
> On Thu, Oct 21, 2021 at 4:19 PM Joe Conway <mail@joeconway.com> wrote:
>> That is a grossly overstated position. When I have looked, it is often
>> not that terribly far off. And for many use cases that I have heard of
>> at least, quite adequate.
> 
> I don't think it's grossly overstated. If you need an approximation it
> may be good enough, but I don't think it will often be exactly correct
> - probably only if the table is small and rarely modified.

meh -- the people who expect this to be impossibly fast don't typically 
need or expect it to be exactly correct, and there is no way to make it 
"exactly correct" in someone's snapshot without doing all the work.

That is why I didn't suggest making it the default. If you flip the 
switch, you would get a very fast approximation. If you care about 
accuracy, you accept it has to be slow.

Joe
-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: parallelizing the archiver
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [RFC] speed up count(*)