Use the analyze command to collect statistics

1. Collect statistics on the table, all columns of the table , and all indexes on the table in calculation mode

analyze table table_name compute statistics;

2. Collect the statistics of the table, and use the calculation mode

analyze table table_name compute statistics for table;

3. Collect statistics of indexes in calculation mode

analyze index index_name compute statistics;

4. Collect statistics on the columns of the table in calculation mode

analyze table table_name compute statistics for table for columns col1,col2;

4. Delete the statistics of the table, all columns of the table and all indexes of the table

analyze table table_name delete statistics;

————————————————————————————————————

Chongqing Sizhuang's March 2018 OCP certification training weekend class is being taught face-to-face, welcome to contact for audition! The new OCP weekend class will start on April 1st. The registration is hot, and the number of places is limited, please book in advance! For more details, visit the Sizhuang website to consult online customer service.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325077958&siteId=291194637