3 ms·
Nothing to see here, move along. Been using this since 2009 https://wiki.postgresql.org/wiki/Count_estimate https://wiki.postgresql.org/wiki/Count_estimate
by j16sdiz 8y ago
Nothing to see here, move along.
Been using this since 2009
https://wiki.postgresql.org/wiki/Count_estimate https://wiki.postgresql.org/wiki/Count_estimate
- davidgould 8y agoBe careful with this if your postgresql release is not up to date. There was a bug in the way ANALYZE updated pg_class.reltuples that could cause the value in reltuples to grow incorrectly for large tables. If the table had a lot of updates the pg_class.reltuples value would tend to increase a bit each time it got updated. This was fixed in March 2018 and was backpatched so any binary release since then should be ok, eg 9.x.latest 10.x.latest, 11.x. See [0] for details of the bug. [0] https://www.postgresql.org/message-id/flat/20180117164916.3fdcf2e9%40engels https://www.postgresql.org/message-id/flat/20180117164916.3f...