Everything else is pretty good, MySQL has compressed tables, but in PostgreSQL the same amount of data already takes less space by default.
Pghero/pg_stat_statements are also very handy.
But "hate"? No, no hate here :)
Everything else is pretty good, MySQL has compressed tables, but in PostgreSQL the same amount of data already takes less space by default.
Pghero/pg_stat_statements are also very handy.
But "hate"? No, no hate here :)
EDIT: I'm also curious what version of Postgres you've experienced this on? Sounds like there may have been improvements to COUNT (DISTINCT in v11+
Basically it's fetching metadata on the table, which can in some cases not be updated (yet), where as in pg it actually counts entries in the index.
The visibility map is stored on-disk as a different fork of the filenode for the table. Two bits are actually stored per page, 1 for visibility and another to mark if the page only contains only frozen tuples. The frozen bit helps reduce the cost of vacuuming the table for transaction wraparound, which is also mentioned in the blog post.
The query planner does not count these bits to determine if it should perform an Index Only Scan vs an Index Scan. An approximate value is stored in pg_class.relallvisible.