On Thu, Jul 16, 2009 at 12:12 AM, Michael Christensen wrote:
> - If you use cfqueryparams in your query, the query is executed as a prepared 
> statement on the SQL server.

To be exact, it is send to the SQL server as a prepared statement.
Whether the SQL server executes it as a prepared statement (uses a
cached plan and inserts the parameters in there) is up to the SQL
implementation.


> - If you don't use cfqueryparams, the query is not executed as a prepared 
> statement.

It is not send to the SQL server as a prepared statement. If the SQL
implementation has a caching mechanism that can cache execution plans
for inline statements it could still use a cached plan.


> 1) can you have queries with cfqueryparams not be executed as prepared 
> statements on the SQL server?

With some implementations.


> 2) could prepared statements have an adverse effect on performance?

Yes.

Jochem


-- 
Jochem van Dieten
http://jochem.vandieten.net/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324631
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