Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Maximum Allowed length of PK ?
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 --
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=