Re:PostgreSQL 10 Released
by aaronbwebber on Thursday October 05, 2017 @11:28AM
(#15409949)
Since 9.2 Postgres has had index-only scans which can substantially improve the performance of `SELECT COUNT(* )` queries. If you need to get exact counts, and your query plan is not showing an index-only scan, you should try adding an index on the columns you are filtering on to see if you can get the query to run on an index-only scan.*
* <all the usual caveats about attempting to tune query performance>
* <all the usual caveats about attempting to tune query performance>