Also, regardless of the performance factors, I prefer the IN method as it is
easier to upgrade.

Dominic


On 22/10/2007, Ben Doom <[EMAIL PROTECTED]> wrote:
>
> Offhand, I'd guess using the "in" syntax, if only because it makes your
> million-line query smaller.
>
> However, if you really want to know, write it each way, populate a db
> with a million rows of fake data, and time it.
>
> --BenD
>
> Will Tomlinson wrote:
> > MySQL 5.
> >
> > Which would be the better choice for a report table. I'm concerned and
> want the query to run as fast as possible because there could end up being
> millions of records in it.
> >
> > I could add the number of fields I need (not worried about the
> flattening of this table and lack of normalization). Instructor1,
> instructor2, 3, 4, etc.
> >
> > Then query like this:
> >
> > AND (e2.instructor1id =
> >     <cfqueryparam value="#ARGUMENTS.instructor#">
> >   OR e2.instructor2id =
> >     <cfqueryparam value="#ARGUMENTS.instructor#">
> >   OR e2.instructor3id =
> >     <cfqueryparam value="#ARGUMENTS.instructor#">
> >       )
> >
> > OR ... I could easily create a list of values, then use the IN keyword:
> >
> > AND someotherfield IN (<cfqueryparam value="#ARGUMENTS.somevaluelist#"
> list="yes">)
> >
> > Thanks,
> > Will
> >
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

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