Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Need help with indexes
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
![]() |
![]() |