20 ms·
You don't need to log every auto explain. Just enable track_io_timing and pg_stat_statements and you get per query IO performance metrics much cheaper. Table F
by mulander 7y ago
You don't need to log every auto explain. Just enable track_io_timing and pg_stat_statements and you get per query IO performance metrics much cheaper.
Table F.21. pg_stat_statements Columns
https://www.postgresql.org/docs/11/pgstatstatements.html https://www.postgresql.org/docs/11/pgstatstatements.html
blk_read_time
double precision
Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)
blk_write_time
double precision
Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)
- jka 7y agoThanks for this - 'pg_stat_statements' definitely looks like a similar feature, in particular because it reflects the count of disk-related operations (not just I/O time). It took some brief configuration but I've been able to try it out locally and will refer to it when doing PostgreSQL query performance tuning in future.