Also lots of cubes can do similar things.
Seems the author made a lot of assumptions without a lot of research.
For one example, I would strongly doubt that count(*) without a where clause isn’t already highly optimized.
Seems the author made a lot of assumptions without a lot of research.
For one example, I would strongly doubt that count(*) without a where clause isn’t already highly optimized.
It's actually not well optimized in PostgreSQL because of MVCC. See https://wiki.postgresql.org/wiki/Slow_Counting
TL;DR:
The fact that multiple transactions can see different
states of the data means that there can be no
straightforward way for "COUNT(*)" to summarize data across
the whole table. PostgreSQL must walk through all rows to
determine visibility.