Are you an LLM? You can read better optimized documentation at /en/docs/latest/sql_reference/object_stats.md for this page in Markdown format
Object stats
Object stats contains four tables: User Tables stats, User index stats, Bad lock stats, and Unused Indexes. Columns in the tables are described as follows:
User Tables stats
Table 1 Columns in the User Tables stats report
Column | Description |
|---|
DB Name | Database name. |
Schema | Schema name. |
Relname | Relation name. |
Seq Scan | Number of sequential scans initiated on this table. |
Seq Tup Read | Number of live rows fetched by sequential scans. |
Index Scan | Number of index scans initiated on the table. |
Index Tup Fetch | Number of live rows fetched by index scans. |
Tuple Insert | Number of rows inserted. |
Tuple Update | Number of rows updated. |
Tuple Delete | Number of rows deleted. |
Tuple Hot Update | Number of rows HOT updated (with no separate index updated). |
Live Tuple | Estimated number of live rows. |
Dead Tuple | Estimated number of dead rows. |
Last Vacuum | Last time at which this table was manually vacuumed (not counting VACUUM FULL). |
Last Autovacuum | Last time at which this table was vacuumed by the autovacuum daemon. |
Last Analyze | Last time at which this table was manually analyzed. |
Last Autoanalyze | Last time at which this table was analyzed by the autovacuum daemon. |
Vacuum Count | Number of times the table has been manually vacuumed (not counting VACUUM FULL). |
Autovacuum Count | Number of times the table has been vacuumed by the autovacuum daemon. |
Analyze Count | Number of times the table has been manually analyzed. |
Autoanalyze Count | Number of times the table has been analyzed by the autovacuum daemon. |
User index stats
Table 2 Columns in the User index stats report
Column | Description |
|---|
DB Name | Database name. |
Schema | Schema name. |
Relname | Relation name. |
Index Relname | Index name. |
Index Scan | Number of index scans initiated on the index. |
Index Tuple Read | Number of index entries returned by scans on the index. |
Index Tuple Fetch | Number of live table rows fetched by simple index scans using the index. |
Bad lock stats
Table 3 Columns in the Bad lock stats report
Column | Description |
|---|
DB Id | OID of the database. |
Tablespace Id | Tablespace OID. |
Relfilenode | File object ID. |
Fork Number | File type. |
Error Count | Number of failures. |
First Time | First occurrence time. |
Last Time | Last occurrence time. |
Unused Indexes
Lists non-unique user indexes whose idx_scan delta between the begin and end snapshots is 0 (system schemas excluded, same rule as User index stats). Primary key indexes, UNIQUE constraint indexes, and indexes created by CREATE UNIQUE INDEX are excluded, because uniqueness checks do not increment idx_scan. Database/Node-wide report, which can be viewed in cluster or node mode for detail or all report types, up to 200 rows.
Table 4 Columns in Unused Indexes
Column | Description |
|---|
DB Name | Database name. |
Schema | Schema name. |
Table Name | Table name. |
Index Name | Index name. |
Total Index Scans | Cumulative index scan count at the end snapshot (not a delta). |