Re: Mysterious FILTER operation ;)

  • From: Edgar Chupit <chupit@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 4 Jan 2005 21:00:58 +0200

This is very interesting observation that I would like to discuss.

According to the "Performance Tuning Guide", for example, the
execution order begins with the line that is the furthest indented to
the right

But this experiment (v_p1>v_p2) ) proves that real execution order can
be different. If we have LIO equal to 0, than INDEX RANGE SCAN was not
performed and FILTER was performed before RANGE SCAN, this is also
proved by sql_trace execution plan:

Rows     Row Source Operation
-------  ---------------------------------------------------
      1  SORT AGGREGATE (cr=0 pr=0 pw=0 time=57 us)
      0   FILTER  (cr=0 pr=0 pw=0 time=8 us)
      0    TABLE ACCESS BY INDEX ROWID OBJ#(282311) (cr=0 pr=0 pw=0 time=0 us)
      0     INDEX RANGE SCAN OBJ#(282328) (cr=0 pr=0 pw=0 time=0
us)(object id 282328)

As we can see from time column to FILTER step consumed 8 us but INDEX
RANGE SCAN  consumed 0 us (was not executed).

Can somebody share some thoughts about real execution path of the statement?

On Tue, 4 Jan 2005 15:40:50 +0200, J.Velikanovs@xxxxxxxx
<J.Velikanovs@xxxxxxxx> wrote:
> I tested it with
> :v_p1:=500;
> :v_p2:=1;
> var. combination.
> In case of CBO
>           0  consistent gets
>           3  consistent gets
> CBO unlike RBO, even doesn't trying to run query.
> Very smart ;)
> Thanks, for explanation.
> Jurijs


Other related posts: