ANALYZE TABLES [ { FROM | IN } database_name ] COMPUTE STATISTICS [ NOSCAN ]ANALYZE TABLE table_identifier[ PARTITION ( partition_col_name [ = partition_col_val ] [ , ... ] ) ]COMPUTE STATISTICS [ NOSCAN | FOR COLUMNS col [ , ... ] | FOR ALL COLUMNS ]
database_name: Name of the database on which table statistics are performed.table_identifier: Name of the table on which statistics are performed.partition_col_name: Name of the column in the partitioned table on which statistics are performed.partition_col_value: Values in the column of the partitioned table on which statistics are performed.ANALYZE TABLE students COMPUTE STATISTICSANALYZE TABLE students COMPUTE STATISTICS FOR COLUMNS nameANALYZE TABLE db.students COMPUTE STATISTICS FOR COLUMNS nameANALYZE TABLE students COMPUTE STATISTICS NOSCANANALYZE TABLE students COMPUTE STATISTICS FOR all COLUMNSANALYZE TABLE db.students COMPUTE STATISTICS FOR all COLUMNSANALYZE TABLE students PARTITION (student_id) COMPUTE STATISTICSANALYZE TABLE students PARTITION (student_id = 111111) COMPUTE STATISTICSANALYZE TABLE db.students PARTITION (student_id = 111111, name = 'test') COMPUTE STATISTICS FOR all COLUMNSANALYZE TABLES COMPUTE STATISTICSANALYZE TABLES COMPUTE STATISTICS NOSCANANALYZE TABLES from school_db COMPUTE STATISTICS NOSCANANALYZE TABLES IN school_db COMPUTE STATISTICS NOSCAN
Feedback