📄️ ANALYZE TABLE
ANALYZE TABLE creates a manual collection task for collecting CBO statistics. By default, manual collection is a synchronous operation. You can also set it to an asynchronous operation. In asynchronous mode, after you run ANALYZE TABLE, the system immediately returns whether this statement is successful. However, the collection task will be running in the background and you do not have to wait for the result. You can check the status of the task by running SHOW ANALYZE STATUS. Asynchronous collection is suitable for tables with large data volume, whereas synchronous collection is suitable for tables with small data volume.
📄️ CREATE ANALYZE
CREATE ANALYZE customizes an automatic collection task for collecting CBO statistics.
📄️ DROP ANALYZE
DROP ANALYZE deletes a custom collection task.
📄️ DROP STATS
DROP STATS deletes CBO statistics, which include basic statistics and histograms. For more information, see Gather statistics for CBO.
📄️ KILL ANALYZE
KILL ANALYZE cancels a running collection task, including manual and custom automatic tasks.
📄️ SHOW ANALYZE JOB
SHOW ANALYZE JOB views the information and status of custom collection tasks.
📄️ SHOW ANALYZE STATUS
SHOW ANALYZE STATUS views the status of collection tasks.
📄️ SHOW META
SHOW META views metadata of CBO statistics, including basic statistics and histograms.