This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing an important gp_toolkit view to finding a list of a table on which ANALYZE is required to be run in Greenplum Database Server.
An ANALYZE command is used to update the object or database statistics information. The query planner always uses the statistics for building the execution plans.
A gp_toolkit is an administrative schema of Greenplum Database server. It provides the list of various views to monitor the Greenplum server.
A gp_stats_missing is one of the views of a gp_toolkit schema which gives us a list of tables which may require an ANALYZE to be run.
Below is a query:
SELECT * FROM gp_toolkit.gp_stats_missing;
After executing the above query, you can get the list of five columns. A column “smisize” is an important column to check the status of table statistics.
If it contains value ‘f’, a table does not have row count and row sizing statistics recorded in the system catalog, which indicates that the table needs to be analyzed.
The meaning of other columns like “simcols”: number of columns in the table, “simrecs”: number of rows in the table.