ANALYZE
Syntax
ANALYZE table_name [ WITH ( property_name = expression [, ...] ) ]
Description
This statement is used to collects statistics on tables and columns in a specified table.
The WITH clause is optional and can be used to specify connector properties. Run the SELECT * FROM system.metadata.analyze_properties command to list all available properties. Currently, only the Hive connector supports this property.
Example
- Collect the statistics of table fruit:
ANALYZE fruit;
- To collect statistics on table storage in catalog hive and schema default:
ANALYZE hive.default.orders;
- Collect information about the 2020-07-17 and 2020-07-18 partitions from the Hive partition table:
ANALYZE hive.web.page_views WITH (partitions = ARRAY[ARRAY['2020-07-17','US'], ARRAY['2020-07-18','US']]);
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot