4 ms·
I could use a count of the number of file I/Os that each query takes, in order to optimize my queries further...
by mozumder 10y ago
I could use a count of the number of file I/Os that each query takes, in order to optimize my queries further...
- anarazel 10y agoThat's been there for a while: EXPLAIN (ANALYZE, BUFFERS) yourquery; If you enable track_io_timing (has some overhead on platforms with slow timestamps, e.g. older VMware), you even get timing. If you want that aggregated, rather than for an individual query, you should look into pg_stat_statements.
- mozumder 10y agoThe BUFFERS count is more for row count info as it operates on large chunks of data, instead of index optimization that needs to count how many times index structures are accessed. Counting IOs directly would be more useful for tuning indexes.
- anarazel 10y agoHuh? It shows you the number of io operations.