Re: INDEX Question
Date: 1995/08/27
Message-ID: <41q2fs$6b0_at_kettle.magna.com.au>#1/1
In article <41agsi$mvf_at_ixnews7.ix.netcom.com>, asmittal_at_ix.netcom.com
says...
>
>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 !
>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.
>
>Fm : Upinder Aggarwal
Sorry to correct you but the index WILL be used. Maybe you can now save some space and increase performance by deleting any unnecessary indexes.
Bob Johnson
Computervision
Sydney Australia
Received on Sun Aug 27 1995 - 00:00:00 CEST