Coldfusion Muse
Posted At : December 16, 2008 9:12 AM | Posted By : Mark Kruger

Cached Plans and Static Variables

Regarding Static Variables in SQL Statements

In my last post I indicated that even static variables passed to SQL statements should be bound using Cfqueryparam. My understanding was that the DB server could only create cached plans if all the variables in the statement were bound - so I believed that a statement like the following:

<cfquery>
   SELECT fname, lname
   FROM   users   
   WHERE   active = 1
</cfquery>
...Could not benefit from the execution plan cache. In the comments of the previous post a number of people disputed this idea, saying that if the variable is static it will cause the execution plan to be cached. Now, Chris Secord has given me a tip on how to prove that I am wrong.

[More]

Comments
Hopefully the next version of ColdFusion will have the ability to utilize new versions of the Ext JS as they come out. But, until that happens we will have to rely on the great work of people like Jason.
# Posted By pasta oyunlar? | 12/27/08 3:18 PM



Blog provided and hosted by CF Webtools. Blog Sofware by Ray Camden.