can you apply Oracle hints to an Object in the actual Object definiton or does it have to be applied at the join level ?
Basically even though I have defined the joins as the keys, when I create big reports and check the sql in show plan I get a number of full table scans, I want to avoid these at all cost ?
Please find out when the statistics were last updated. You can get a rough idea looking at all_indexes view. If the statistics are not updated the Cost optmizer will have to scan the table to generate the associated costâŚ
As dave pointed out, scanning itself is not necessarily evil and is useful with smallish tables as accessing indexes has its own costâŚ
Create a dimension object with select
/*+ HINT */ ââ
This wonât parse in Designer but should work on the database side. When in query panel, always add the hint objects first so it will be the first line in your select clause.
Actually there is another thing (I havenât tested this). In your universe if you go to your connection properties there is a hint parameter (custom tab). By applying a hint here probably means all your queries based on this universe use this parameter.
This might be useful if for instance your Oracle instance has a rule based optimizer mode and some of the tables have statistics analyzed - in this case you might want to have a hint CHOOSE to force Oracle to use cost based optimizer for these tables.
Thanks for that, I got the hint working ealier, funny thing is though it
did Parse successfully in designer.
Fortantly for me in 99% reports the first object selected is EMPID and this is where I applied the Hint. The problem I have though now the smaller reports now run slower due to the hint (bit of pain).
The options I can think of at the moment is to have two EMPID objects and work out what the best situation is to use either one is.
I was going to try and apply the index at the join level, what is the syntax
for this, my current join is
PRD.PS_JOB.EMPLID=PRD.PS_ING_IFACE_TBL.EMPLID
I want to force it to use the index PSOJOB on PRD.PS_JOB table how would I code this in the join.
Are you working in a Data warehouse environment or OLTP system?
In a DW you should hardly ever need to use hints, because the DW should be configured properly.
Nop not a datawarehouse, just a standard psoft database.
I agree with you that I shouldnt need to use the hints, I have told the dbas here that Im having to use a hint to force a use of index, more worry though is the fact that the index Im forcing is the Daddy index
on applications Daddy table, so it indicates a problem.
I found this topic and created a hint object as described earlier in the thread using this syntax: /*+ HINT */ ââ
It worked great during initial tests! Queries where many times faster. I called it the Magic Object ('cuz users couldnât see what it did) and the users testing the change loved it.
But when it was moved to the production server (most of our users use zabo) it DID NOT WORK. I looked bad. Odd thing is it worked fine on other WEBI servers.
Turns out this syntax works in NT but not in our AIX environment. Adding a space between the two single quotes fixed it so the hint works in both NT and Unix: /*+ HINT */ â â