MySQL Forums
Forum List  »  Optimizer & Parser

Re: Query Optimization
Posted by: Bill Karwin
Date: April 26, 2006 05:29PM

Doh! I was scanning for instances of "masterquotes.dtEntered". Sorry about that.

Well, I would write the query as follows:

SELECT ...
FROM masterquotes AS m
JOIN carriersettlement AS cs ON m.webquotecontrol = cs.webquotecontrol
JOIN status AS s ON m.statusdi = s.statusdi
WHERE m.dtEntered LIKE '2006-04-26%'
AND m.statusedi NOT IN ('Pend-I', 'Memo', 'MEMO', 'NOT SRCS', 'NOT SRCS-I', 'PEND-I', 'Pend-A')

It should give equivalent results, and perhaps the optimizer can understand NOT IN and JOIN syntax more easily.

What version of MySQL are you using?

Regards,
Bill K.

Options: ReplyQuote


Subject
Views
Written By
Posted
3733
April 26, 2006 01:57PM
2009
April 26, 2006 04:46PM
1905
April 26, 2006 04:56PM
Re: Query Optimization
2094
April 26, 2006 05:29PM
1899
May 03, 2006 03:11PM
1891
May 03, 2006 03:31PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.