| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: non numeric primary key
Fernando wrote:
> I've been told that choosing a non numeric field as a primary
> key would hurt performance, is this true? O:-)
Yes. In most DB implementations the number of bits used to store an number is smaller than used to store a string (Space). Second, the algorithm used to compare strings is less efficient, per byte, than it is for numbers (Speed).
There could be implementations that are specifically suited for comparing short strings (4-8 chars) just as fast as numbers, but I would imagine they are rare.
-- ---------------------------------------------------------------------- Kyle Lahnakoski Arcavia Software Ltd. (416) 892-7784 http://www.arcavia.comReceived on Sun Jan 16 2000 - 00:00:00 CST
![]() |
![]() |