Re: Compare sql and dynamic sql

From: Rajendra Pande <rpande_at_home.com>
Date: Sat, 02 Oct 1999 14:42:26 GMT
Message-ID: <37F61712.92E3A580_at_home.com>


> query outlines, new in Oracle8i release 8.1, allow you to tune a database in a
> certain way (get the plans you really really want for a set of queries) -- store
> those plans in the database (in the outlines table) and then make it so your
> application will use those plans -- regardless of the current stats on the
> table, regardless of the version of Oracle (eg: this feature is also known as
> "query plan stability" -- if you don't want the plans to change for queries due
> to patches or upgrades -- you can use this as well).

Thomas, I have a question about outlines. Say I have the standard emp scott.table with only one index with PK on empno. I create an outline for the query SELECT * FROM EMP where DEPTNO between 10 and 20. This obviously does a full table scan. I can the outline and see that it has been stored. I then create an index on the deptno, do an alter session to use the outline and execute the query. Will the query execution then do a full table scan or an index scan. The trace output seems to indicate that it is using the index and not a full table scan. The outline is used.

Thanks and regards. Received on Sat Oct 02 1999 - 16:42:26 CEST

Original text of this message