Re: INDEX Question
Date: 1995/08/21
Message-ID: <41agsi$mvf_at_ixnews7.ix.netcom.com>#1/1
In <412e7o$7i5_at_newsbf02.news.aol.com> roywagner_at_aol.com (Roy Wagner)
writes:
>
>If you set up an INDEX as follows:
>
>create index TABLE on TABLE(Column1,Column2);
>
>does this set up the index as a concatenated index or as separate
indexes
>for Column1 and Column2?
>
>If it creates a composite index as the book I have indicates, do I
have to
>set up separate indexes on Column1 (or Column2) if I want "indexed"
access
>on only that column; .ie. select * from TABLE where Column1 =
>"something";.
>
>Thanks for clarifying this for me!
>
>
>
>
>- Roy Wagner -
>"When driving my Miata, I always get to where I'm going before I want
to
>stop driving it."
Hi !
Fm : Upinder Aggarwal
The composite index is used only if the query has a condition based on
all the columns of the index. Otherwise the index is not used. So to
use the index on column1 = something you have to create an index on
column1 separately.