ANALYZE¶
Synopsis¶
Description¶
Collects table and column statistics for a given table.
The optional WITH
clause can be used to provide connector-specific properties. To list all available properties, run the following query:
Examples¶
Analyze table web
to collect table and column statistics:
Analyze table stores
in catalog hive
and schema default
:
Analyze partitions '1992-01-01', '1992-01-02'
from a Hive partitioned table sales
:
Analyze partitions with complex partition key (state
and city
columns) from a Hive partitioned table customers
:
ANALYZE hive.default.customers WITH (partitions = ARRAY[ARRAY['CA', 'San Francisco'], ARRAY['NY', 'NY']]);
Analyze only columns department
and product_id
for partitions '1992-01-01', '1992-01-02'
from a Hive partitioned table sales
: