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: Help on Indexes!

Re: Help on Indexes!

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: Mon, 18 Jan 1999 09:42:21 +0800
Message-ID: <36A2917D.7C22@bhp.com.au>


Adrian Harrison wrote:
>
> I have a table with 2 fields "ID, Name"
>
> I want to be able to search on them both together & individually!
>
> Do I have to create 3 indexes i.e on ID, Name, ID&Name or will just the one
> ID&Name work?
>
> Thanks
>
> Adrian HArrison

(Largely) paraphrased...

An index on (id, name) will help

  1. queries on "id"
  2. queries on ( id, name)
  3. not queries on name

An index on each will help:

  1. queries on id
  2. queries on name
  3. queries on both (but not as well as the index above)

There are a lot of other dependencies on all of this being - format of your SQL etc etc

Cheers
--



Connor McDonald
BHP Information Technology
Perth, Western Australia
"The difference between me and a madman is that I am not mad" Received on Sun Jan 17 1999 - 19:42:21 CST

Original text of this message

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