Re: JOINs against a subquery

From: Álvaro G. Vicario <alvaroNOSPAMTHANKS_at_demogracia.com>
Date: Tue, 25 Nov 2008 16:31:31 +0100
Message-ID: <ggh5ou$6s9$1@huron.algomas.org>


Charles Hooper escribió:
> Just a guess as the Oracle version was not specified and the DBMS
> Xplans were not posted, but from your description, it sounds like
> Oracle is taking the CUSTOMERS table and attempting to drive into the
> inline view that you aliased as SA. Essentially, this means that for
> each row in the CUSTOMERS table, the full view is resolved. This
> seems to happen on more frequently Oracle 10g (R2) than it did in
> older versions. You are able to control this behavior through the use
> of hints.

Sorry, I forgot to mention it's 10g R1. I didn't post actual data because it gets quite complicated and I just wanted some general advise. (Furthermore, I generate explain plans with SQL Developer and I don't have the faintest idea of how to export it into a readable format...)

I see my misconception was believing that the subquery was independent from the external query. No matter how the code looks, the Oracle optimizer rewrites it all trying to find the optimal execution plan.

I'll have a look at the documentation about optimizer hints.

Thank you very much.

-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
Received on Tue Nov 25 2008 - 09:31:31 CST

Original text of this message