Re: [EXT] Improve "select count(*)" query - takes more than 30 mins for some large tables

Поиск
Список
Период
Сортировка
От Ron
Тема Re: [EXT] Improve "select count(*)" query - takes more than 30 mins for some large tables
Дата
Msg-id 3dc59390-b2ab-4ccb-3e3f-cc7a1c095829@gmail.com
обсуждение исходный текст
Ответ на Re: [EXT] Improve "select count(*)" query - takes more than 30 mins for some large tables  (Scott Ribe <scott_ribe@elevated-dev.com>)
Список pgsql-admin
On 7/12/22 21:28, Scott Ribe wrote:
>> On Jul 12, 2022, at 8:12 PM, MichaelDBA <MichaelDBA@sqlexec.com> wrote:
>>
>> Oh really? Even if it did an INDEX ONLY SCAN, it would still be slower because it still has to access the heap in a
randomI/O kinda way  (like I said-->"The heap always gets accessed for select counts") because visibility info is only
foundin the HEAP not the index.
 
> This changed in 9.something. There is now a visibility map, which can, for data that hasn't changed recently,

How recently is "recently"?  And does VACUUM clean it up?

-- 
Angular momentum makes the world go 'round.



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

Предыдущее
От: Mladen Gogala
Дата:
Сообщение: Re: [EXT] Re: Improve "select count(*)" query - takes more than 30 mins for some large tables
Следующее
От: Goti
Дата:
Сообщение: Check Postgres DB open mode