Re: SQL Newbie needs urgently help! [optimizing query]
Posted by:
Toa Sty
Date: January 24, 2007 10:29AM
Ah I seem to have lost my reply to this. (thought I'd posted it but I can't see it here)
So, quickly:
* I must admit I'm not sure why the second query plan is better - it looks worse to me.
* Have you tried extracting the subquery to see if you can optimise it on its own as a way to simplify the problem ? (replacing references to the outer select with constants and compare various execution plans)
I'm not sure whether the subquery is being strangely optimised or whether it's some interplay with the EXISTS clause that I'm not familiar with.
Sorry I can't help more - it's hard without being able to test/play with the query.
Hopefully with all the info you've posted someone will be able to suggest something!
Toasty
PS have you run analyze table on these tables recently? We could be trying to optimise something that doesn't need it...
-----------------------------------------
email: 'toasty'*3 at gmail
Subject
Views
Written By
Posted
3549
January 24, 2007 05:31AM
2350
January 24, 2007 05:52AM
2254
January 24, 2007 06:07AM
2305
January 24, 2007 06:18AM
2169
January 24, 2007 06:41AM
2183
January 24, 2007 07:16AM
2263
January 24, 2007 08:16AM
2341
January 24, 2007 08:50AM
2189
January 24, 2007 09:10AM
2303
January 24, 2007 09:24AM
Re: SQL Newbie needs urgently help! [optimizing query]
2427
January 24, 2007 10:29AM
2249
January 24, 2007 10:40AM
2186
January 24, 2007 03:19PM
2114
January 25, 2007 07:27AM
2164
January 24, 2007 07:16AM
2333
January 24, 2007 07:32AM
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.