March 2008 Archives

Execution Plan Stability

Okay, so we all know that problem of SQL-Statements suddenly going AWOL and using a completely different execution plan from what the database has used in the past. Most of the time the database will take the right route by changing the execution plan - but, alas, not always. By using outlines you can force the Oracle database to use the same execution plan regardless of what has changed in the way of statistics or indexes. This entry neatly explains how it works and when you might want to use outlines.

Redefinition of Oracle tables (online / offline)

When a table becomes out of sync with reality and you have to perform some open-heart surgery on your database, you might be happy with a good assistant like DBMS_REDEFINITION at your side. This Oracle package will let you change most aspects of a table while the table is still in use. This is done, by creating a copy of the original table and switching the original and duplicate tables once all changes have been completed. The package utilizes the snapshot (or materialized view) technology within the Oracle database. This is a good summary on how to go about reorganizing tables with the DBMS_REDEFINITION package.


Restrictions: Be aware, that this package will not work on tables which already have snapshots (MViews) defined.