In one of my earlier posts, I had illustrated a use case of DBMS_ADVANCED_REWRITE and its use in cases where we cannot change the code, but can still influence and change the way the optimizer executes the same SQL statement.
In case of many vendor provided and packaged applications, we do not have access to the SQL code and we cannot rewrite the SQL statements.
So there could be cases where even though indexes are present on the table, they are not being used by the optimizer and one way we can force the optimizer to use an index is via the INDEX hint.
So how we change the execution plan of the optimizer for a particular statement without changing the original SQL statement that the application is executing?
We do it using the powerful new feature introduced in 10g called DBMS_ADVANCED_REWRITE or “tuning without touching the code”.
To illustrate this, let us create
Continue reading Using DBMS_ADVANCED_REWRITE with an HINT to change the execution plan


Popular Posts