Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Physics of the FILTER operation within SQL_PLANE.

RE: Physics of the FILTER operation within SQL_PLANE.

From: Lex de Haan <lex.de.haan_at_naturaljoin.nl>
Date: Wed, 30 Jun 2004 11:30:01 +0200
Message-ID: <JFEEIGBIDOCCDALDIPLNMEFACFAA.lex.de.haan@naturaljoin.nl>


Hi Jurijs,
allow me one comment about your statement below, about the optimizer not being able to calculate differences:

you are forcing RBO behavior, a technology now obsolete in 10g and untouched by Oracle development for many, many years...

(interesting email thread, by the way)  

Kind regards,
Lex.  



visit my website at http://www.naturaljoin.nl
 

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of J.Velikanovs_at_alise.lv Sent: Wednesday, June 30, 2004 10:02
To: oracle-l_at_freelists.org
Subject: Re: Physics of the FILTER operation within SQL_PLANE.

If your hypnotize is true (regerding remembering last value), then I have one more interesting conclusion:
The cost of the same SQL with the same execution plans can differ depending on rows ordering in the driving rowset. Like with index range scan and clustering factor, but with one little difference - Oracle optimizer in case of FILTER operation can't evaluate this cost (in case of range scan - clustering factor statistics available).
Even more, if your hypnotize is true, then cost difference can appears not from bigger LIO count, but also because in one case Oracle need to manage hash table in other doesn't (just use last remembered value). For my point demonstrating purpose, I have a little bit modified my initial testcase (1,2).
Take a look: the same SQL, the same ExplPlan, time differs by 18% and Oracle optimizer can't caltulate this difference.

Jurijs

TESTCACE 1



SELECT /*+ RULE */ count(m.v) from main_tab m where
        exists
        (select v from 

  filter_tab f where f.n=m.n and f.v like 'a%')

TESTCACE 2



SELECT /*+ RULE */ count(m.v) from main_tab m where
        exists
        (select v from 

  filter_tab f where f.n=m.n and f.v like 'a%')
Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Wed Jun 30 2004 - 04:27:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US