> Given that the DB is likely to recompile the code if it 
> senses that the current plan may not be optimal I assumed you 
> were pointing out that there would be overhead in the 
> generation of the new plan.

There are a set of specific things that will cause the database to recompile
the plan. It's not really a matter of "sensing that the current plan may not
be optimal".

> Of course, I guess that could be a "draw back" of stored 
> procs even.  

Yes, which is why you have a "WITH RECOMPILE" option in SQL Server. There
isn't very much difference between a stored procedure and a prepared
statement.

> In other words, usage of a non-optimal plan is not directly the 
> fault of cfqueryparam, but a side-effect of any manner of SQL 
> execution allows for caching.

Yes, but if you're using CFQUERYPARAM or stored procedures you're a lot more
likely to run into that problem than if you're not. Personally, I'm willing
to live with that because the alternative is generally worse.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286007
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to