dalibo / pev2

Postgres Explain Visualizer 2
https://explain.dalibo.com
PostgreSQL License
2.55k stars 124 forks source link

Show heap fetches as percent % #589

Closed pgiraud closed 2 weeks ago

pgiraud commented 1 year ago

It would be nice to get the percentage of rows that are read from the heap. https://explain.dalibo.com/plan/da11bg7302g59e03#plan/node/11

Plan comes from https://twitter.com/pgMustard/status/1636800885320712216

Also, the warning level may need some adjustments.

Krysztophe commented 1 year ago

The % of blocks is perhaps more important, but you can't have that.

The threshold should be rather low. A rather small proportion is already the sign that you need a VACUUM.

I hope to find time to test soon.

Krysztophe commented 1 year ago

I confirm: a few percent of heap fetches is already a disaster.

Examples (in the worst case: old computer, default configuration, not enough RAM, slow HDD) :

pgiraud commented 2 weeks ago

Won't fix. This doesn't seem very relevant. Instead a warning is displayed each times there's at least one heap fetch.