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
| Component | Description |
|---|---|
| DB CPU | Time sessions spent actively using CPU |
| SQL Execute Elapsed Time | Time spent executing SQL statements |
| Parse Time Elapsed | Time spent parsing SQL (soft + hard) |
| PL/pgSQL Execution | Time in stored procedures and functions |
| Connection Management | Time spent establishing connections |
| Idle Wait Time | Time 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:
| Ratio | Formula | Healthy Value |
|---|---|---|
| Buffer Cache Hit Ratio | (Blks Hit) / (Blks Hit + Blks Read) × 100 | > 95% |
| Checkpoint Write Ratio | Buffers Checkpoint / Buffers Written | Lower is better |
| Transaction Commit Ratio | Commits / (Commits + Rollbacks) × 100 | > 99% for OLTP |
| Index Usage Ratio | Index scans / (Index + Sequential scans) × 100 | Depends 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.
:::