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

Home -> Community -> Usenet -> c.d.o.server -> Re: Execution plan Question

Re: Execution plan Question

From: rok <rthumsi_at_cncx.com>
Date: 20 Aug 1998 07:55:59 PDT
Message-ID: <01bdcc4a$b779c920$6db59bcf@thumsi95.cncx.com>


I would go with 2nd plan. Even if there is a nested loop, it will only be 20-30 times. Table2 is queried using pk index. Each query results in only one record as this is primary key.

raghuvir

Ullrich Hertlein <heul0011_at_rz03.FH-Karlsruhe.DE> wrote in article <6rh9n2$grv$1_at_nz12.rz.uni-karlsruhe.de>...
> hi !
>
> i have made 2 execution plans for equivalent queries, and
> my problem is, which one to use.
> here are the reduced plans:
>
> no 1 is:
> selct stmt
> filter cost 1
> table access tab2 FULL cost 1
> table access tab1 FULL cost 2
>
> no 2 is:
> select stmt
> nested loops cost 1
> table access full tab1 cost 1
> table access by rowid tab2 cost 2
> index range scan tab2_pk cost 1
>
> of course the first approach is to say that 2 full scans
> are much slower , but the filter operation is much more
> cheaper (linear i think) then the nested loop in the 2nd
> plan.
>
> table tab1 has max. 20-30 records, tab2 about 2000 - 4000 records.
>
> anybody ... ?
>
> thanks a lot !
>
> bye, ulli
>
>
> **************************************************
> * Ulli Hertlein
> * EMAIL: hertlein_at_gbraun-ems.de
> * URL: http://WWW.ulli.hertlein.home.pages.de
> **************************************************
>
>
Received on Thu Aug 20 1998 - 09:55:59 CDT

Original text of this message

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