RE: cfqueryparam - order of where/and

2002-02-15 Thread Dave Watts
> Then... As a best practice(?) start by assuming that you're > DB will process your where clauses from the bottom up and > help the system out. If you're lucky enough to have the best > stuff out there, like Oracle, which I assume atleast 85%, > probably more, don't have then just code comple

RE: cfqueryparam - order of where/and

2002-02-14 Thread Mark A. Kruger - CFG
group by always runs last because it needs the record set before grouping. Mark -Original Message- From: Kwang Suh [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 9:42 AM To: CF-Talk Subject: RE: cfqueryparam - order of where/and I'm fairly certain that SQL Server pro

RE: cfqueryparam - order of where/and

2002-02-14 Thread Tyler M. Fitch
tp://isitedesign.com ** -Original Message- From: Dave Carabetta [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 9:40 AM To: CF-Talk Subject: RE: cfqueryparam - order of where/and >Actually, > >The where clause processes bottom up.

RE: cfqueryparam - order of where/and

2002-02-14 Thread Kwang Suh
I'm fairly certain that SQL Server processes top down. Oracle used t o process them bottom up. -Original Message- From: Tyler M. Fitch [mailto:[EMAIL PROTECTED]] Sent: February 14, 2002 10:15 AM To: CF-Talk Subject: RE: cfqueryparam - order of where/and Actually, The where c

RE: cfqueryparam - order of where/and

2002-02-14 Thread Dave Carabetta
>Actually, > >The where clause processes bottom up. > >So, if possible, for best results place your most restricting clauses >LAST and filter out the greatest amount of data. Then the next where >clause up from the bottom has the least amount of records possible to >compare against and will perfo

RE: cfqueryparam - order of where/and

2002-02-14 Thread Tyler M. Fitch
** -Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 9:06 AM To: CF-Talk Subject: RE: cfqueryparam - order of where/and I personally have found that when I have a huge query it makes it faster if I do the joins

RE: cfqueryparam - order of where/and

2002-02-14 Thread Costas Piliotis
Yes the order of the clauses in the where statement matter. First, you want to use indexed fields. That way, you make full use of database optimizations. The execution plan *should* figure it out, but it's still good practice to use indexed fields first regardless. Dunno about the second quest

RE: cfqueryparam - order of where/and

2002-02-14 Thread Robert Everland
I personally have found that when I have a huge query it makes it faster if I do the joins that get rid of the most data first. So say I have a query like this. Select * >From Accounts, Sales Where accounts.address = sales.address And salesdate = #now()# And item = 13882 I would redo th