RE: Different Plans for Literal Vs Bind Variables

What's the DB version?  If it's 9i+, are you using bind variable peeking?  If 
so, then the plan with the literal should be the same as the plan with the bind 
variable unless the bind statement is already cached with a plan optimized 
based on a significantly different bind value.  If you're not using bind 
variable peeking, the usual solution is to provide a hint or stored outline.  
If you can't do a hint since it's coming from PeopleSoft, then the outline is 
the way to go, or if you're in 10g and have the tuning pack, can use a SQL 
Profile, but if you're in 10g, then you should probably be using bind variable 
peeking.

Regards,
Brandon



Privileged/Confidential Information may be contained in this message or 
attachments hereto. Please advise immediately if you or your employer do not 
consent to Internet email for messages of this kind. Opinions, conclusions and 
other information in this message that do not relate to the official business 
of this company shall be understood as neither given nor endorsed by it.
--
http://www.freelists.org/webpage/oracle-l


Other related posts: