Re: Help !! Index creation

From: Kevin J Barnes <kbarnes_at_airmail.net>
Date: 1996/03/25
Message-ID: <31576236.7369_at_airmail.net>#1/1


deangup_at_admin.ci.seattle.wa.us wrote:
>
> > raj_at_cs.clemson.edu (Raj Rangarjan) writes:
> > Hi,
> > I had two question regarding index creation in oracle and was
> > hoping someone could answer them:
> > 1. Does it matter what order the indexes are created , if two
> > or more fields in a table are indexed?
> No, as I understand it. In DB2 the first index is the default clustering index, predisposing the DBMS to
> physically order rows per that index. But Oracle does not appear to care about physical row order as far
> as I've been able to tell.
> > 2. Does the order of the fields in the table(ie the order they
> > are specified when the table is created) matter when indexes
> > are created on this field?
> No, IMHP.
>
> - Paul de Anguera, City of Seattle HRISActually the order of the fields in the index does matter when you are
using the field in a where clause. If you search on the second column Oracle will not know to use the index.

It is important that you put the primary search column first. If you *always* use both columns in the where clause then it does not matter.

KEvin Received on Mon Mar 25 1996 - 00:00:00 CET

Original text of this message