Reporting Statistics
Vertica supplies hints about statistics two ways:
- The
EXPLAIN
-generated query plan is annotated with a status. See Reacting to Stale Statistics. - The last time
ANALYZE_STATISTICS
was run for a table is recorded, so that subsequent calls to the function are optimized. This is useful during the database design process because if Database Designer does not collect statistics when adding design tables, it generates a warning indicating that statistics are old. You can then decide whether to runANALYZE_STATISTICS
before you proceed with the design.
Two columns in the V_CATALOG.PROJECTION_COLUMNS
system table capture statistical information, as follows:
STATISTICS_TYPE
returns the type of statistics the column contains, one of the following:NONE
,ROWCOUNT
, orFULL
.STATISTICS_UPDATED_TIMESTAMP
returns the last time statistics were collected in this table.