SQL Performance (MOSC)

MOSC Banner

SQL Optimizer HINT works but dbms_sqldiag.create_sql_patch is slower

This describes a procedure that I hope will improve application performance without touching the application code. 

The application uses IBM Rational ClearQuest to search a moderately large 9M row Table with code lookups and access restrictions. The user types either a unique ID or a low cardinality PRI but CQ always generates WHERE ID LIKE '%<unique ID>%'. The Oracle optimizer thinks that this will match on 5% of the rows so it does a Full Table Scan. If you take away the first % or use = then the query is very fast. I believe that I can use dbms_sqldiag.create_sql_patch to inject a hint into the SQL without changing the application. Query time will go from 5 minutes down to sub-second. This

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center