Question : Oracle hints in test environments

Hi experts,
I have read that Oracle hints should not be used in production systems for individual queries unless one knows very well what is going on behind the scenes. In this case what is the use of applying the numerous available hints in the test systems for performance improvement if these hints are not carried over to the production system?
Thanks in advance.

Answer : Oracle hints in test environments

>>then why are hints considered among the most important features of query tuning?

Who says that?  

Hints can change the plan and might help narrow down where the issues might be.  They can also let you experiment with some parameters w/o altering your session.

To me the most important is the explain plan for high level then tkprof for nuts and bolts.  The new SQL optimizer in DB Console and Grid control are getting better with each new release.  They can recommend changes to increase SQL performance.

>>and then re-write the query to follow that plan without using hints?

I figure you'll find it pretty hard to change SQL order/syntax for force a different plan w/o hints.  Oracle tends to rewrite the query on the back end for you anyway.  Just because you code it one way, doesn't mean Oracle will execute it that way.

>>does this mean that one can keep developing Oracle applications for years without knowing about hints at all?

I've been using Oracle for around 15 years.  I think I've only ever used hints in production once or twice on very specific select statements.  This was in early releases when the Cost-Based Optimizer was pretty new and full of bugs.

It's a lot more stable now and should probably be trusted more than not trusted.
Random Solutions  
 
programming4us programming4us