impala COMPUTE INCREMENTAL STATS
时间: 2024-02-10 18:43:45 浏览: 107
impala connection test
Impala's COMPUTE INCREMENTAL STATS command is used to gather statistics on table partitions that have been modified since the last time statistics were gathered. This command is useful for improving query performance, as it allows Impala to make better decisions about how to execute queries.
When you run COMPUTE INCREMENTAL STATS on a table, Impala will compare the modification time of each partition to the last time statistics were gathered. If a partition has been modified since then, Impala will gather statistics on that partition. If a partition has not been modified, Impala will skip gathering statistics on that partition.
To use COMPUTE INCREMENTAL STATS, you can run the following command:
```
COMPUTE INCREMENTAL STATS <table_name>
```
This will gather statistics on any partitions that have been modified since the last time statistics were gathered on the specified table. You can also use the optional PARTITION clause to specify a specific partition to gather statistics on, like this:
```
COMPUTE INCREMENTAL STATS <table_name> PARTITION (<partition_spec>)
```
In this case, Impala will only gather statistics on the specified partition if it has been modified since the last time statistics were gathered.
阅读全文