Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Need help with indexes

Need help with indexes

From: Randy Harris <randy_at_SpamFree.com>
Date: Fri, 19 Sep 2003 15:24:24 GMT
Message-ID: <HcFab.642$Hd6.481392@newssvr28.news.prodigy.com>


I'm using 8.1.7 and am looking for some advice on creating indexes.

A table includes columns A and B. I expect to use both fields in WHERE clauses and ORDER BY clauses so I would like indexes on both of them. The SELECT statements will likely use one or the other but not both, however I need the (A,B) combination to be UNIQUE.

I thought:

Create INDEX on A (not unique)
Create INDEX on B (not unique)
Create UNIQUE CONSTRAINT on (A,B)

It won't let me do that.

Will simply creating a unique index on (A,B) do what I want if I only use one field or the other in SELECT statements?

Thanks in advance for any suggestions. Received on Fri Sep 19 2003 - 10:24:24 CDT

Original text of this message

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