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
3649
January 24, 2007 05:31AM
2399
January 24, 2007 05:52AM
2278
January 24, 2007 06:07AM
2340
January 24, 2007 06:18AM
2190
January 24, 2007 06:41AM
2241
January 24, 2007 07:16AM
2295
January 24, 2007 08:16AM
2384
January 24, 2007 08:50AM
2210
January 24, 2007 09:10AM
2371
January 24, 2007 09:24AM
Re: SQL Newbie needs urgently help! [optimizing query]
2470
January 24, 2007 10:29AM
2316
January 24, 2007 10:40AM
2208
January 24, 2007 03:19PM
2162
January 25, 2007 07:27AM
2247
January 24, 2007 07:16AM
2359
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.