Re: query optimization question (my struggle against 'using temporary; using filesort')

2009-09-24 Thread Ciaran Lee
not looking for NULL rows or anything. In fact, it looks like > mysql is smart enough to know that you've negated the OUTER JOIN by putting > conditions on the joined tables in the WHERE clause, and convert then to > INNER JOINS. Don't rely on that! Use the correct join type

RE: query optimization question (my struggle against 'using temporary; using filesort')

2009-09-24 Thread Gavin Towey
. Those queries Regards, Gavin Towey -Original Message- From: Ciaran Lee [mailto:ciaran@gmail.com] Sent: Tuesday, September 22, 2009 1:32 PM To: mysql@lists.mysql.com Subject: query optimization question (my struggle against 'using temporary; using filesort') Hi, I hope th

query optimization question (my struggle against 'using temporary; using filesort')

2009-09-22 Thread Ciaran Lee
Hi, I hope this is the right place to ask a question about query optimization. Background: I have a database which has events, which occur in places (listings). Places have addresses, and addresses belong to a city. I can select the latest event within a particular city very efficiently (less tha

Re: Query Optimization Question

2006-03-14 Thread Michael Stassen
[EMAIL PROTECTED] wrote: Yes, a ranged query should respond faster than a negation. In some cases you can seriously improve query performance for a negation query if you split it into two range queries unioned together. Here is a pseudo example: This query should be slow due to the table scan

Re: Query Optimization Question

2006-03-13 Thread Michael Stassen
Robert DiFalco wrote: > In a previous database engine I was using an IN was more optimal than a > <>. So, for example: > > SELECT * FROM table WHERE table.type IN (1,2,3); > > Where the possible values of type are 0-3, was appreciably faster than: > > SELECT * FROM table WHERE table.type <

RE: Query Optimization Question

2006-03-13 Thread Robert DiFalco
ql.com Subject: RE: Query Optimization Question Yes, a ranged query should respond faster than a negation. In some cases you can seriously improve query performance for a negation query if you split it into two range queries unioned together. Here is a pseudo example: This query should be slow

RE: Query Optimization Question

2006-03-13 Thread SGreen
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, March 13, 2006 6:37 AM > To: Robert DiFalco > Cc: mysql@lists.mysql.com > Subject: Re: Query Optimization Question > > > > > "Robert DiFalco" <[EMAIL PROTECTED]>

RE: Query Optimization Question

2006-03-13 Thread Robert DiFalco
Shawn, Any performance gains for specifying "type > 0" than "type <> 0" ? R. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 13, 2006 6:37 AM To: Robert DiFalco Cc: mysql@lists.mysql.com Subject: Re

Re: Query Optimization Question

2006-03-13 Thread SGreen
"Robert DiFalco" <[EMAIL PROTECTED]> wrote on 03/11/2006 12:43:43 PM: > In a previous database engine I was using an IN was more optimal than a > <>. So, for example: > > SELECT * FROM table WHERE table.type IN (1,2,3); > > Where the possible values of type are 0-3, was appreciably faster th

Re: Query Optimization Question

2006-03-11 Thread Mladen Adamovic
Robert DiFalco wrote: In a previous database engine I was using an IN was more optimal than a <>. So, for example: SELECT * FROM table WHERE table.type IN (1,2,3); Where the possible values of type are 0-3, was appreciably faster than: SELECT * FROM table WHERE table.type <> 0; I

Query Optimization Question

2006-03-11 Thread Robert DiFalco
In a previous database engine I was using an IN was more optimal than a <>. So, for example: SELECT * FROM table WHERE table.type IN (1,2,3); Where the possible values of type are 0-3, was appreciably faster than: SELECT * FROM table WHERE table.type <> 0; I've been playing with the

Re: Query optimization question

2004-10-04 Thread SGreen
0/04/2004 10:33:22 AM: > Query optimization question > > I am selecting from a single table but it has a lot of rows and it has > a very involved calculation. What I really want to do is > is FIRST restrict the number of rows so that the big calculation is only > performed

Re: Query optimization question

2004-10-04 Thread gerald_clark
Gerald Taylor wrote: Query optimization question I am selecting from a single table but it has a lot of rows and it has a very involved calculation. What I really want to do is is FIRST restrict the number of rows so that the big calculation is only performed on the ones that are within 3

Query optimization question

2004-10-04 Thread Gerald Taylor
Query optimization question I am selecting from a single table but it has a lot of rows and it has a very involved calculation. What I really want to do is is FIRST restrict the number of rows so that the big calculation is only performed on the ones that are within 3 degrees. Using 4.0.20 A