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: Creating Indexes

Re: Creating Indexes

From: Steve McDaniels <steve.mcdaniels_at_sierra.com>
Date: Wed, 17 Nov 1999 14:18:29 -0800
Message-ID: <80v9kp$kg4$1@plo.sierra.com>


The fastest possible INDEX strategy (in this context) is to index each field separately.

The second fastest (in this context) is for the first field of the composite index
to be less sparse than the second (unless in a datamart or warehouse, something which one typically cannot control)

The penalty in using a composite index revolves around the case where, given two fields which combine to form a composite index, one "uses" the index with only one of the two fields present in the where clause.

Praveen Mohanan <praveen_mohanan_at_hotmail.com> wrote in message news:942856189.920138_at_sj-nntpcache-1.cisco.com...
> Hi. DBA Gurus,
>
>
> I have a select stmt,
>
> select ....
> from table1_at_ERP_ABC
> where table1.fields1 = 'XYZ'
> and table1.field2 = 'STU'
> and table1.field3 != 'AAAA';
>
>
> The query is very slow. And i found that there is no index on the
composite
> column (field1, field2, field3). But there are other indexes on (field1,
> field2) & another one on (field3). If i create a index on (field1, field2,
> field3), will the query run faster?
>
> Regards
>
>
Received on Wed Nov 17 1999 - 16:18:29 CST

Original text of this message

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