Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Creating Indexes
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