RE: Different Plans for Literal Vs Bind Variables

From: Allen, Brandon <Brandon.Allen_at_OneNeck.com>
Date: Fri, 9 Jan 2009 15:47:46 -0700
Message-ID: <64BAF54438380142A0BF94A23224A31E10A33B712C_at_ONEWS06.oneneck.corp>



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
Received on Fri Jan 09 2009 - 16:47:46 CST

Original text of this message