Will it even cache the plan without the 1 being a parameter?

In either case, I'd still advocate the use of schema prefixes/aliases.


On 2/20/13 1:15 PM, "Dave Watts" <[email protected]> wrote:

>
>> You could also add schema prefixes to your tables and columns (or alias
>> them) as well as make the 1 a parameter.
>>
>> That should help with execution plan caching.
>
>Actually, caching the execution plan with a parameter here is probably
>a bad idea - at least half the time!
>
>When you have a bit value (on/off) as a parameter, the execution plan
>will either be very very good, or very very bad. You're better off not
>using a parameter (which will give you two execution plans ultimately
>that are more specific and both very very good) or using WITH
>RECOMPILE to avoid the use of any cached execution plans at all.
>
>Dave Watts, CTO, Fig Leaf Software
>http://www.figleaf.com/
>http://training.figleaf.com/
>
>Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
>GSA Schedule, and provides the highest caliber vendor-authorized
>instruction at our training centers, online, or onsite.
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354603
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to