RDBMS Information - PostgreSQL - Checking missing statistics on a schema
Purpose
This page provides the method to check the missing statistics on a schema.
For more information, refer to:
- For 8.3 : Official documentation (RDBMS)
- For 8.2 : Official documentation (RDBMS)
- For 8.1 : Official documentation (RDBMS)
- For 8.0 : Official documentation (RDBMS)
Applicable Platform
| Platform | Yes/No |
|---|---|
| CSS3 | ✅ |
| CSS2 | ✅ |
| CSS1 | ✅ |
Details
- Open pgAdmin3 located in the CastStorageServices\bin installed directory.
- Connect to the server and deploy the node database postgres.
- Select Sql query item in the tools menu and execute the query below.
- To list tables with missing statistics for a selected schema
Run the query below which lists tables where statistics has never been ran.
select relname as table from pg_stat_user_tables where lower(schemaname) = lower(’<selected_schema>’) and last_analyze is null and last_autoanalyze is null and n_live_tup > 0 order by relname
**Query result example**

**Notes/comments**
**Related Pages**