Re: Simple Query - No Join - But Temp. Table and file Sort :(
Posted by:
Toa Sty
Date: October 21, 2006 10:55AM
Using code like this will work be a bit like <pre> :)
As for the query, not sure how you can make it not use temps and filesorts off the top of my head. If you were using = rather than >= you wouldn't be seeing them as your evdate_2 index would be used.
If you're not bothered about the order of the results (after grouping) you could add 'order by NULL' to drop the filesort but you'll probably not see much noticeable performance increase if any.
Actually - how come you're doing a GROUP BY but not using any aggregation functions (eg SUM, COUNT, MIN) on the non-grouped cols? You'll be getting unpredictable values for evdate and loc (unless they're always the same for any value of lockey, in which case you're data might be in need of normalisation, and if you normalise you won't need the GROUP BY :)
Toasty
-----------------------------------------
email: 'toasty'*3 at gmail
Subject
Views
Written By
Posted
4189
October 21, 2006 09:06AM
Re: Simple Query - No Join - But Temp. Table and file Sort :(
2545
October 21, 2006 10:55AM
2366
October 21, 2006 11:17AM
2740
October 21, 2006 05:20PM
2923
October 23, 2006 06:41AM
2663
October 23, 2006 11:02AM
2337
October 23, 2006 01:01PM
2963
October 22, 2006 04:56AM
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.