Skip to main content

Time Model Statistics

The Time Model Statistics section breaks down how database time was spent during the report period. It answers the question: of all the time sessions spent in the database, how much went to SQL execution, transaction management, waiting, etc.?

{screenshot: awr-time-model-section}


Understanding DB Time

DB Time is the total wall-clock time accumulated across all active sessions during the report interval. It is the core metric of the Time Model.

DB Time = Sum of (time each active session spent in the database)

For example, if 10 sessions were each active for 60 seconds during a 1-minute interval, DB Time = 600 seconds (10 minutes of DB Time in 1 minute of elapsed time).


Time Model Components

ComponentDescription
DB CPUTime sessions spent actively using CPU
SQL Execute Elapsed TimeTime spent executing SQL statements
Parse Time ElapsedTime spent parsing SQL (soft + hard)
PL/pgSQL ExecutionTime in stored procedures and functions
Connection ManagementTime spent establishing connections
Idle Wait TimeTime sessions spent idle or waiting for client

Instance Efficiency Ratios

Below the Time Model table, PMP4PG displays key efficiency ratios computed from the snapshot data:

RatioFormulaHealthy Value
Buffer Cache Hit Ratio(Blks Hit) / (Blks Hit + Blks Read) × 100> 95%
Checkpoint Write RatioBuffers Checkpoint / Buffers WrittenLower is better
Transaction Commit RatioCommits / (Commits + Rollbacks) × 100> 99% for OLTP
Index Usage RatioIndex scans / (Index + Sequential scans) × 100Depends on workload

{screenshot: awr-efficiency-ratios}

:::tip Interpreting the Cache Hit Ratio A Buffer Cache Hit Ratio below 90% in an OLTP environment indicates that many queries are reading from disk rather than memory. Consider increasing shared_buffers in postgresql.conf or reviewing query plans for missing indexes causing full table scans. :::


Next Steps