I UPDATE OUTLN.OL$HINTS, doesn't that in fact directly manipulate the table?
Main Topics
Browse All TopicsWhen upgrading to 10g last year we had an issue with Siebel efficiency. Since siebel creates its own queries we could not optimize this through our sql code. The solution was to use stored outlines to trick oracle into doing the right thing (in this case query all rows instead of the 10 rows which was siebels default set at the session level). This was achieved by using this code:
ACTION PLAN
============
1. Create a outline for the query without any hint.
SQL> create outline osql on <select statement>
2. Create a outline for the query with hint.
SQL> create outline hsql on <select /*+ ALL_ROWS */ ...........>
3. Run the below update statement to exchange the outline osql and hsql.
SQL> UPDATE OUTLN.OL$HINTS
SET OL_NAME=DECODE(OL_NAME,'HS
WHERE OL_NAME IN ('HSQL','OSQL');
SQL> commit;
My problem is in 11g, the documentation clearly states:
"Oracle creates the USER_OUTLINES and USER_OUTLINE_HINTS views in the SYS tablespace based on data in the OL$ and OL$HINTS tables, respectively. Direct manipulation of the OL$, OL$HINTS, and OL$NODES tables is prohibited. "
http://download.oracle.com
That being the case, how do I now work around this issue? I heard something about using 'base outlines' but haven't found much documentation on that.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Did some research and though Oracle says it is prohibited, it seems to hint that 11gR1 still works the way it used to, but the docs recommend to use SQL Plan Baseline feature because the stored outlines will be deprecated / desupported.
I'm here: http://download.oracle.com
No definitive answer, as this is not a feature I've used lately, but will try to figure it out if I can get the time to play.
I would not act at the dbms level for this purpose.
It adds a maintenance task that is pricey.
If your stats are to date, you may have a problem of mismatching usage of a column.
Ex: Using the same ext_XM.ATTRIB1 column to store TYPE = "ID" and TYPE = "LOV1" will get stats that work with IDs but won't work to search for a LOV1 value
BigSchmuch,
I do agree that the maintenance task is pricey and am certainly not a fan!
My issue has to do with a siebel session call at logon "ALTER SESSION SET optimizer_mode = FIRST_ROWS_10 ", This is a setting through the Siebel app and I am unable to change this. The particular query I run does not have 10 results (it in fact has 7) which apparently causes the query to run twice as long. When I do the outline switch-a-roo using a hint for all rows (recommended by Oracle Support) it is substantially faster.
At this point I am not sure if the optimizer will continue to have issues with this parameter in 11g. It is possible that it is now smart enough to deal with it efficiently. However I am still a few days away from having my hardware available to test.
If you have such a difference in execution time, this means you have a different QueryPlan coming out the query whether you add or miss the hint.
You may look at the difference and understand what statistics is missing its goal
I would try 2 other solutions:
a) a BusComp UserProp
May be an unofficial BC userprop can handle this hint ?
Search for it in Flat mode using patterns like *first* or *FIRST*
b) a statistics modification
Not sure you can handle this in 11g but modifying stats is still another maintenance task...may be easier to handle
Business Accounts
Answer for Membership
by: mrjoltcolaPosted on 2009-08-05 at 09:56:46ID: 25025479
I do not think you even need to worry about that. You are not directly manipulating OL$ or the other tables.
If you have CREATE ANY OUTLINE privilege, that should be all you need to accomplish what you've done in prior releases of Oracle.
The OL$ and OL$HINTS tables as the base for the USER_* views is no different than any other USER_* view, they are ALL stored in SYS, and you still can access them quite nicely.
Good luck.