DROP_STATISTICS
Removes statistical data on database projections previously generated by ANALYZE_STATISTICS. When you drop this data, the Vertica optimizer uses default statistics to create query plans.
Caution: Before you drop statistics, be aware that statistics can be time consuming to regenerate.
Syntax
DROP_STATISTICS ('[ scope ]'[, 'category'] [, 'column[,…]' )
Parameters
| scope |
Specifies the target table as follows: [[database.]schema.]table If set to an empty string, Vertica drops statistics for projections of all database tables. If you specify a database, it must be the current database. |
| category |
The category of statistics to drop for the named table, one of the following:
|
| column |
The name of a column in table, typically a predicate column. You can specify multiple comma-delimited columns. Vertica narrows the scope of dropped statistics to the specified columns only. |
Privileges
- INSERT/UPDATE/DELETE privilege on table
- USAGE privilege on schema that contains the table
Examples
Drop all base statistics for the table store.store_sales_fact:
=> SELECT DROP_STATISTICS('store.store_sales_fact');
DROP_STATISTICS
-----------------
0
(1 row)
Drop statistics for all table projections:
=> SELECT DROP_STATISTICS ('');
DROP_STATISTICS
-----------------
0
(1 row)