Updated on 2025-08-25 GMT+08:00

ANALYZE | ANALYSE

Function

Collects statistics about table contents in databases. The statistical results are stored in LakeFormation. The execution plan generator uses this statistical data to determine the most efficient execution plan.

Users capable of executing ANALYZE on a specific table include the table's owner and users granted read permissions on the table.

Precautions

ANALYZE scans all data in the table and generates billing records.

Syntax

Collect statistics about a table.
1
{ ANALYZE | ANALYSE } table_name;

Parameter Description

table_name

Name of the specific table to be analyzed (may include schema qualification).

Range: an existing table name.

Examples

Use the ANALYZE statement to update the statistics of the customer_info table.
1
ANALYZE customer_info;