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

From MichaelDBA
Subject Re: [EXT] Re: Improve "select count(*)" query - takes more than 30 mins for some large tables
Date
Msg-id b76730ff-dd92-d4d6-60cf-64d00dc4db43@sqlexec.com
Whole thread Raw
In response to Re: [EXT] Re: Improve "select count(*)" query - takes more than 30 mins for some large tables  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: [EXT] Improve "select count(*)" query - takes more than 30 mins for some large tables
List pgsql-admin
Laurenz,

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 random I/O kinda way  (like I said-->"The heap always gets accessed for select counts") because visibility info is only found in the HEAP not the index.


Laurenz Albe wrote on 7/12/2022 3:13 PM:
I'd say that both statements are wrong:


Regards,

Michael Vitale

Michaeldba@sqlexec.com

703-600-9343 


Attachment

pgsql-admin by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: [EXT] Re: Improve "select count(*)" query - takes more than 30 mins for some large tables
Next
From: Scott Ribe
Date:
Subject: Re: [EXT] Improve "select count(*)" query - takes more than 30 mins for some large tables