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

Home -> Community -> Usenet -> c.d.o.misc -> newbue question: understanding indexes

newbue question: understanding indexes

From: Vince Laurent <vlaurent_at_NOSPAM.networkusa.net>
Date: Fri, 05 Jul 2002 12:44:05 -0500
Message-ID: <0bmbiu4ov0vus0edrbk88qqrmlvao3r260@4ax.com>


We have a report that uses a table (GLPCA) and I was asked to see if it used a certain field (BUKR) as a field. Well, the table has 6 indexes: GLPCA~0 and so on...

I ran the following SQL script:
SQL> select index_name, column_name
  2 from dba_ind_columns
  3 where index_owner = 'SAPR3' and
  4 index_name like '%GLPCA%'
  5 order by index_name, column_position;

And got back

INDEX_NAME COLUMN_NAME
------------ ---------------

GLPCA~0      RCLNT
GLPCA~0      GL_SIRID

GLPCA~1      KOKRS
GLPCA~1      RYEAR
GLPCA~1      RPRCTR
GLPCA~1      RVERS
GLPCA~1      RACCT

GLPCA~2      DOCNR
GLPCA~2      RYEAR
GLPCA~2      DOCCT
GLPCA~2      RBUKRS
GLPCA~2      RLDNR
GLPCA~2      RCLNT
GLPCA~2      DOCLN

GLPCA~3      REFDOCNR
GLPCA~3      REFRYEAR
GLPCA~3      REFDOCCT
GLPCA~3      RBUKRS
GLPCA~3      RLDNR
GLPCA~3      REFDOCLN
GLPCA~3      RCLNT

GLPCA~7      RHOART
GLPCA~7      KOKRS
GLPCA~7      RYEAR
GLPCA~7      ACTIV
GLPCA~7      POPER

As you can see, the field appears in an index
GLPCA~2      RBUKRS

But the index also has many other fields. So how can I answer the question: "Can you tell if GLPCA is index by BUKR?" Apparently there is a report that uses that field a lot.

How does a table use an index that has more than 1 key in it?

Thanks! Received on Fri Jul 05 2002 - 12:44:05 CDT

Original text of this message

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