On a regular basis, I find queries that run considerably a
lot faster without a cfqueryparam. For instance, I have this query
that takes 87 seconds to run
with the cfqueryparam and less than one second
without it.

I’m running CF 6.1MX and SQL Server 2005.

I found some posts online that suggest that there are issues
with cfqueryparams and SQL Server 2005, but thought I’d double
check here.|||
I find that with Oracle and redbrick, cfqueryparam tends to
make queries run faster. On db2 there seemed to be little if any
difference. I have not really tested SQL Server.|||
You should make sure your are using the correct datatype
definition on the <cfqueryparam> tag.

I’ve sometimes noticed that a table scan will take place if
you are using -for example – a cf_sql_numeric datatype in the
<cfqueryparam> definition on an integer column.

Hope this works for use.

Related posts:

  1. Slow queries
  2. null in cfqueryparam
  3. cfqueryparam and non-English languages
  4. CFQUERYPARAM – Can it work without throwing an error?
  5. timestamp in cfqueryparam

Related posts brought to you by Yet Another Related Posts Plugin.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
© 2012 free icons download Suffusion theme by Sayontan Sinha

Featuring Recent Posts WordPress Widget development by YD