Home » SQL & PL/SQL » SQL & PL/SQL » Performance impacts using Unique Keys vs Primary Keys
Performance impacts using Unique Keys vs Primary Keys [message #21647] Wed, 21 August 2002 07:54 Go to next message
Malini K. Sinha
Messages: 4
Registered: July 2002
Junior Member
From a logical standpoint, a Primary Key (PK) is a Unique Key (UK) with a "Not Null" constraint on the respective column(s).

However, while performing joins within SELECTs, does Oracle 8i's Cost Based Optimizer cause any performance impacts that would cause me to choose using a PK instead of a UK with a "Not Null" constraint?

Also, is there any impact while using Triggers with a UK with a "Not Null" constraint?

I know Oracle 7i had a performance impact as a result of using a UK with a "Not Null" constraint, but not sure if Oracle 8i fixed this.

Can anybody help me with this?
Thanks in advance.
Malini
Re: Performance impacts using Unique Keys vs Primary Keys [message #21655 is a reply to message #21647] Wed, 21 August 2002 13:59 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
I'm not aware of any performance problem on Ora7, but no I don't know of any reason why a PK should be any different to a Unique constraint when it comes to performance. The Not Null can be used by the CBO, so Unique and Unique Not Null are different.
Previous Topic: Cursor record counts
Next Topic: Prefixed Indexes
Goto Forum:
  


Current Time: Fri Mar 29 09:03:00 CDT 2024