MSSQL 2000
Data direct driver 3.4 with the standard jdbc.sqlserver.SQLServerDriver.

-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 29, 2006 7:33 AM
To: CF-Talk
Subject: Re: cfqueryparam DECREASES performance?

Porter, Benjamin L. wrote:
> 
> SELECT 
>               Id,
>               Description
> FROM          Product
> WHERE         ProductID = 2
> 
> VS (with query param )
> 
> DECLARE @P1 int
> SET @P1 = 2
> 
> SELECT 
>               Id,
>               Description
> FROM          Product
> WHERE         ProductID = @P1
> 
> CF then uses a stored procedure spprepexec to try to force the dbms to
> precompile the sql statement into an execution plan for faster
execution
> on subsequent calls.

With which driver did you observe this behaviour? For which version of
MS SQL Server was that? ISTM that a more efficient approach would be to
use sp_executesql or SQLPrepare and I am surprised that a driver would
choose a strategy that would force an execution for every recompile.

Jochem



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265300
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