Skip to main content

PostgreSQL SQL Statistics

SQL statistic nameDescriptionDBmarlin collects?Doc Link
**duration**Derived field = total_time / total_exec_time Yes - derivedN/A
**executions**Derived field=calls Yes - derivedN/A
**logical_reads**Derived field = shared_blks_hit + shared_blks_read Yes - derivedN/A
**logical_writes**Derived filed = shared_blks_dirtied + shared_blks_written Yes - derivedN/A
**physical_reads**Derived field = shared_blks_read Yes - derivedN/A
**total_time**PostgreSQL 12 or earlier Yes PostgreSQL 12 Docs
**calls**Number of times the statement was executed Yes PostgreSQL Docs
**shared_blks_hit**Total number of shared block cache hits by the statement Yes PostgreSQL Docs
**shared_blks_read**Total number of shared blocks read by the statement Yes PostgreSQL Docs
**shared_blks_dirtied**Total number of shared blocks dirtied by the statement Yes PostgreSQL Docs
**shared_blks_written**Total number of shared blocks written by the statement Yes PostgreSQL Docs
**total_exec_time**Total time spent executing the statement, in milliseconds Yes PostgreSQL Docs
**userid**OID of user who executed the statement No PostgreSQL Docs
**dbid**OID of database in which the statement was executed No PostgreSQL Docs
**toplevel**True if the query was executed as a top-level statement No PostgreSQL Docs
**queryid**Hash code to identify identical normalized queries No PostgreSQL Docs
**query**Text of a representative statement No PostgreSQL Docs
**plans**Number of times the statement was planned No PostgreSQL Docs
**total_plan_time**Total time spent planning the statement, in milliseconds No PostgreSQL Docs
**min_plan_time**Minimum time spent planning the statement, in milliseconds No PostgreSQL Docs
**max_plan_time**Maximum time spent planning the statement, in milliseconds No PostgreSQL Docs
**mean_plan_time**Mean time spent planning the statement, in milliseconds No PostgreSQL Docs
**stddev_plan_time**Population standard deviation of time spent planning the statement, in milliseconds No PostgreSQL Docs
**min_exec_time**Minimum time spent executing the statement, in milliseconds No PostgreSQL Docs
**max_exec_time**Maximum time spent executing the statement, in milliseconds No PostgreSQL Docs
**mean_exec_time**Mean time spent executing the statement, in milliseconds No PostgreSQL Docs
**stddev_exec_time**Population standard deviation of time spent executing the statement, in milliseconds No PostgreSQL Docs
**rows**Total number of rows retrieved or affected by the statement No PostgreSQL Docs
**local_blks_hit**Total number of local block cache hits by the statement No PostgreSQL Docs
**local_blks_read**Total number of local blocks read by the statement No PostgreSQL Docs
**local_blks_dirtied**Total number of local blocks dirtied by the statement No PostgreSQL Docs
**local_blks_written**Total number of local blocks written by the statement No PostgreSQL Docs
**temp_blks_read**Total number of temp blocks read by the statement No PostgreSQL Docs
**temp_blks_written**Total number of temp blocks written by the statement No PostgreSQL Docs
**blk_read_time**Total time the statement spent reading data file blocks, in milliseconds No PostgreSQL Docs
**blk_write_time**Total time the statement spent writing data file blocks, in milliseconds No PostgreSQL Docs
**temp_blk_read_time**Total time the statement spent reading temporary file blocks, in milliseconds No PostgreSQL Docs
**temp_blk_write_time**Total time the statement spent writing temporary file blocks, in milliseconds No PostgreSQL Docs
**wal_records**Total number of WAL records generated by the statement No PostgreSQL Docs
**wal_fpi**Total number of WAL full page images generated by the statement No PostgreSQL Docs
**wal_bytes**Total amount of WAL generated by the statement in bytes No PostgreSQL Docs
**jit_functions**Total number of functions JIT-compiled by the statement No PostgreSQL Docs
**jit_generation_time**Total time spent by the statement on generating JIT code, in milliseconds No PostgreSQL Docs
**jit_inlining_count**Number of times functions have been inlined No PostgreSQL Docs
**jit_inlining_time**Total time spent by the statement on inlining functions, in milliseconds No PostgreSQL Docs
**jit_optimization_count**Number of times the statement has been optimized No PostgreSQL Docs
**jit_optimization_time**Total time spent by the statement on optimizing, in milliseconds No PostgreSQL Docs
**jit_emission_count**Number of times code has been emitted No PostgreSQL Docs
**jit_emission_time**Total time spent by the statement on emitting code, in milliseconds No PostgreSQL Docs

Search online​

If this article doesn't have the information you need you can try searching online. Remember, you can contribute suggestions to this page.