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: Maximum Allowed length of PK ?

Re: Maximum Allowed length of PK ?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 30 Sep 2004 09:41:20 -0500
Message-ID: <553ed0f2ee432fa14bdeadce0476c1bf$1@www.orafaq.net>

xtanto wrote:

> Hi All,

> We are designing on Oracle 9i database. Many tables have PK on one
> column of
> 30 Varchar2 length. Some even with 50 Varchar2 column as PK.

> Will this cause performance problem ?
> What is the maximum 'allowed' length of one column as PK / Index
> without causing performance degradation ?

> Thank you,
> xtanto

Based on experience a single column PK of length up to 50 is not going to present any performance problem.

I have never read a published study about the performance impact of increasing the size of a single column PK, but like I said I do not think it will hurt you.

I have read an Oracle support post on metalink before Oracle stopped supporting the forumns where the analyst posted results of a comparison of numeric verse varchar2 PK run resutls. There was very little performance difference with numeric winning when the processing count got into the hundreds of thousands of keys. On single key access you will not see the difference, but as you process key after key the difference in performance adds up.

HTH -- Mark D Powell --

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Received on Thu Sep 30 2004 - 09:41:20 CDT

Original text of this message

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