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(tick)
CSS2(tick)
CSS1(tick)



Details
  1. Open pgAdmin3 located in the CastStorageServices\bin installed directory.
  2. Connect to the server and deploy the node database postgres.
  3. Select Sql query item in the tools menu and execute the query below.
  4. To list tables with missing statistics for a selected schema
    1. 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