Impala – Use Incremental stats instead of Full Table stats

If you have a table which is partitioned on a column then doing
Compute stats TABLE_NAME
will execute on all partitions.

Internally compute stats run NDV function on each column to get numbers. However NDV function works faster then other count(COLUMN), but it will run for each partition which may be irrelevant when you are working/updating/modifying values on only one partition.

So, instead use :

This will run on a partition for which stats are not collected. So if you have dropped/added a partition it will run on that. You can specify partition separately as well to compute stats on it only.

Note : Please check the version as this may not be available for the version you are running.