Hi All
Is there a way to determine if a hint was used in a SQL statement?
Example
I got a call from a developer saying that their query was going very slow
I checked what oracle was doing
It was using an index with 5 distinct values on a table with a row count of 9.2 million
Selectivity was very bad.
I then discovered after talking to the developer that he had a hint in to use the index (idiot)
Once we took the hint out it did a Full Table scan and actually ran a lot faster.
However when I was looking at the SQL text in v$sql and v$sqlarea there was no way to tell if a Hint was being used
IE I did see: /* + RULE */ in the code.
Does anyone know how to check (from the DB) if a hint is being used in a sql statement?
And if the hint is being used, what the hint is.
Thanks
G.