on a SQLServer list I'm on, the answer was IN. I think it was something about full table scans.
 
also, are you sure this isn't OR (not AND)???
 
<cfloop list="#some_list#" index="i">
AND field1 = <cfqueryparam
              value="#i#"
                cfsqltype="CF_SQL_NUMERIC">
</cfloop>
 
just 2c worth
 
PS: anyone interested in answering my CF6.1/apache install Q? I just need a starter - want to go over to the "other side" - M$ go to hell!
 
 
-----Original Message-----
From: Gavin Cooney [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 14 October 2003 3:45 PM
To: CFAussie Mailing List
Subject: [cfaussie] IN versus cfloop and where

Hi all
 
Anyone know which would be quicker on a huge (couple of million records) on mySQL?
 
UPDATE
    table_name
SET
    field1 = <cfqueryparam value="W" cfsqltype="CF_SQL_CHAR">
WHERE
  primary_key of table IN (<cfqueryparam
                                            value="#some_list#"
                                            cfsqltype="CF_SQL_NUMERIC" list="Yes">)
 
OR
 
UPDATE
    table_name
SET
    field1 = <cfqueryparam value="W" cfsqltype="CF_SQL_CHAR">
WHERE
    1=1
<cfloop list="#some_list#" index="i">
AND field1 = <cfqueryparam
              value="#i#"
                cfsqltype="CF_SQL_NUMERIC">
</cfloop>
 
Thanks for your help
 
Gavin
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to