Home » RDBMS Server » Server Administration » Simple question
Simple question [message #120269] Wed, 18 May 2005 11:58 Go to next message
kapil2005
Messages: 44
Registered: March 2005
Member
I am working on a project here and I am seeing a table with a primary key index and a unique index on same set of columns, is it a good practice? For me it’s not making any sense. Do you guy know why a table can have both primary and unique key indexes on same set of columns?
Thanks
Re: Simple question [message #120272 is a reply to message #120269] Wed, 18 May 2005 12:18 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
Are the columns in the two indexes in different orders?

Queries "prefer it" when the leading column(s) in the index are used in the query criteria. So if your system has different queries, some which reference one column only and some which reference another column only, then the multiple indexes may have been created with these differing queries in mind.

If this is an associative table, you may want to consider making it an index organized table.
Re: Simple question [message #120273 is a reply to message #120272] Wed, 18 May 2005 12:28 Go to previous messageGo to next message
kapil2005
Messages: 44
Registered: March 2005
Member
YES, they are in different order, really!!
Thanks a lot
Re: Simple question [message #120437 is a reply to message #120269] Thu, 19 May 2005 14:29 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
It is somewhat overdone to make the additional index unique though...

hth
Previous Topic: Oracle9i Download for Windows Server 2003
Next Topic: Oracle 9.2.0.5 Vs Oracle 9.2.0.6
Goto Forum:
  


Current Time: Fri Sep 27 02:19:00 CDT 2024