Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Incremental global stats in 12c?

steffiJul 25 2020 — edited Aug 14 2020

I've got a large backlog of tables with partitions that show stale_stats = yes and I observed than if I just try to create incremental global stats on these tables it doesn't automatically go back and collect the stats on the partitions that are stale. So before this I have a loop over the partitions that are stale and I collects stats on them.

However I'm noticing that it's visiting the same partitions each week this job runs so it seems as though stats are not leaving stale state on these tables.

The tables are partitioned by time and the data in older partitions is not changing except for one use case which is that I'm also compressing partitions with another job but does compressing partitions invalidate stats at all?

These are large tables and the thinking was that I'd use incremental global stats to avoid the full scan of all partitions when collecting global stats.

However just collecting incremental stats does not seem to make any effort to update existing stale partition stats first.

Comments
Post Details
Added on Jul 25 2020
11 comments
1,141 views