Posted by David Aldridge on 2008-05-21
I wrote a while ago about the harmful effect of check constraints on query optimization. I’ll pause while you catch up on that …
Anyway, this appears to have been addressed in 10.2.0.4, and it’s now safe to go back into the water on applying check constraints. Bug 5891471.
The bug description also notes that you can set event 10195 to disable transitive predicate generation using check constraints.
I haven’t tested any of this — I will if I get time. Unless someoneelse wants to …
Posted in Oracle | 4 Comments »
Posted by David Aldridge on 2008-05-07
Following on from the previous post, a little glitch in the plans: the instance appeared to crash late last night during the load. Hopefully not some exotic bug associated with dynamic sampling.
I modified the delete-and-lock strategy yesterday after remembering that we have a number of indexes that are created with the “compute statistics” option. Since DBMS_STATS.LOCK_TABLE_STATS is intended to prevent the modification of any statistics associated with a table I ran a quick test to see if compute statistics can be specified for an index created against a statistics-locked table, and indeed it cannot.
SQL Error: ORA-38029: object statistics are locked
38029. 00000 - “object statistics are locked”
*Cause: An attept was made to modify optimizer statistics of the object.
*Action: Unlock statistics with the DBMS_STATS.UNLOCK_TABLE_STATS procedure
on base table(s). Retry the operation if it is okay to update statistics.
Well, it was probably safer not to anyway for a first run.
Now, whatever happened to that database instance?
Posted in Oracle | Leave a Comment »
Posted by David Aldridge on 2008-05-06
I am absolutely sick and tired of dealing with issues where misleading partition statistics (for example) cause ETL queries to go crazy and try to sort-merge tables with tens of millions of rows each.
Since we’re about to run a test load on production data I’m going to drop all table and index statistics and lock them. OK, actually I’m going to back the statistics up first, and then I’m going to drop and lock them.
We’ll see how we do on a 100% dynamic sampling-based system …
Posted in Oracle | 15 Comments »