Personnal reflexions around Oracle and my applications

Problems with incremental stats + compression + extended stats

I have recently hit a bug (that seems to be fixed in the BP6 for Exadata)

But i thought it was interesting to post about this (it may help someone)

When you have a table that is compress, you need to be carefull with Extended statistics cause it had a virtual hidden column to manage those stats. Right now there is no problem, the problems start when you drop the extended stats and try to use incremental stats on the table.

When you drop the extended stats it does not remove the virtual hidden column (first problem) it just set the column as UNUSED because of the compression.

My issue cames from this and the use of the incremental stats which had a bug and does not know anything about UNUSED columns. So each time i was trying to gather stats on the table Oracle was gathering all the stats again and again because it was finding that this UNUSED column did not get any stats…..