MySQL Forums
Forum List  »  Optimizer & Parser

Re: Simple Query - No Join - But Temp. Table and file Sort :(
Posted by: Heiko G.
Date: October 21, 2006 11:17AM

Hi Toasty,

Thx for your Answer. The Background for this query is: I want to know all locations for which a record exists in the table (actually its a event table) and where the event-date is >= Today. So it should give my all Locations for which I have events in the future. This is also the reason for the GROUP BY. And yes, loc and lockey is the always the same pair.

I think u mean I have to use WHERE MAX(e.evdate) >=1161449050, right ? Now as you say it it seems logic to me :/

I cant remove the "Greater" operator, but test without it pointed out in no performance increase, neither of dropping temp table or filesort. I just wonder why mysql needs to do some filesort on the loc-field. I thought a index over this field (its varchar is u can see) should fix the problem....

Well iam not too deep into DB design ;)

Thx
Heiko

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Simple Query - No Join - But Temp. Table and file Sort :(
2365
October 21, 2006 11:17AM


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.