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: is index better option here

Re: is index better option here

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Wed, 13 Dec 2006 11:20:56 +0100
Message-ID: <4ua2foF16np0mU1@mid.individual.net>


On 13.12.2006 09:14, peter wrote:
> before index output of explain is
>
> SQL> @?\rdbms\admin\utlxplp.sql
>
> PLAN_TABLE_OUTPUT
> --------------------------------------------------------------------
>
> --------------------------------------------------------------------
> | Id | Operation | Name | Rows | Bytes | Cost |
> --------------------------------------------------------------------
> | 0 | SELECT STATEMENT | | 1 | 40 | 5 |
> |* 1 | TABLE ACCESS FULL | N | 1 | 40 | 5 |
> |* 2 | TABLE ACCESS FULL | N | 1 | 15 | 5 |
> |* 3 | TABLE ACCESS FULL | N | 1 | 15 | 5 |
> --------------------------------------------------------------------
> ********************************************************************
>
> after index output of explain is
>
> SQL> @?\rdbms\admin\utlxplp.sql
>
> PLAN_TABLE_OUTPUT
> ----------------------------------------------------------------------------
>
> ----------------------------------------------------------------------------
> | Id | Operation | Name | Rows | Bytes |
> Cost |
> ----------------------------------------------------------------------------
> | 0 | SELECT STATEMENT | | 1 | 40 |
> 5 |
> |* 1 | TABLE ACCESS FULL | N | 1 | 40 |
> 5 |
> |* 2 | TABLE ACCESS BY INDEX ROWID| N | 1 | 15 |
> 27 |
> |* 3 | INDEX RANGE SCAN | IND_N_CC | 144 | |
> 1 |
> |* 4 | TABLE ACCESS BY INDEX ROWID| N | 1 | 15 |
> 27 |
> |* 5 | INDEX RANGE SCAN | IND_N_CC | 144 | |
> 1 |
> ----------------------------------------------------------------------------
>

Difficult to tell without more detail (DDL, Ora version etc.). The remaining table scan can be caused by any of these - and maybe more:

Btw, you usually get more information from the plan by using package DBMS_XPLAN.         robert Received on Wed Dec 13 2006 - 04:20:56 CST

Original text of this message

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