Truncate table updating statistics oracle
The Oracle query optimizer relies on both the statistics of the entire table (global statistics) and the statistics of the individual partitions (partition statistics) to select a good execution plan for a SQL statement.
It adjusts the minimum and maximum values of the partitioning column as follows; it uses the high bound partitioning value as the maximum value of the first partitioning column (it is possible to have concatenated partition columns) and high bound partitioning value of the previous partition as the minimum value of the first partitioning column for range partitioned table.
Re-gathering statistics for the effected partitions and for the entire table can be very time consuming.
Traditionally, statistics collection is done in a two-pass approach: The full scan of the table for global statistics collection can be very expensive depending on the size of the table.
If you are interested in more details of the incremental maintenance feature, please refer to the following paper presented in SIGMOD 2008 Assume we have table called SALES that is range partitioned by day on the SALES_DATE column.
At the end of every day data is loaded into latest partition and partition statistics are gathered.