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
3684
January 24, 2007 05:31AM
2422
January 24, 2007 05:52AM
2299
January 24, 2007 06:07AM
2358
January 24, 2007 06:18AM
2214
January 24, 2007 06:41AM
2268
January 24, 2007 07:16AM
2321
January 24, 2007 08:16AM
2408
January 24, 2007 08:50AM
2229
January 24, 2007 09:10AM
2397
January 24, 2007 09:24AM
Re: SQL Newbie needs urgently help! [optimizing query]
2504
January 24, 2007 10:29AM
2335
January 24, 2007 10:40AM
2228
January 24, 2007 03:19PM
2183
January 25, 2007 07:27AM
2267
January 24, 2007 07:16AM
2384
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.