In first difference between numeric and char(varchar2) datatypes
is tiny if they have the same length and I don't care about it.
But, as "common theoretical" problem, this difference exists.
1)char(varchar2) fields Oracle store as ascii/ebcdic/unicode characters
with maximum length 4000 characters.
Most CPU platforms on assembler/mashine code level have to use
commands like 'long compare' and 'long moving' for work with this type of
Binary structure of these commands has only 1 byte for describe length of operation,
then maximum preparing data length will be no more then 256 bytes and Oracle
(and any other program) must use set of mashine commands for comparing
(for example) two varchar2 fields.
2)numeric(number) fields Oracle store in binary-decimal numeric system and
(as i know) most CPU platforms on assembler/mashine code/ level have
set of special command for work with this type of data (PACK group) and
any program can use only 1 mashine command in sort/find and so on operations.
In this case Oracle has to implement two independent parts of assempler
code for execution comparing or moving char(varchar2) datatype and number datatype.
I guess, this is internal nature of difference of number and varchar2 datatypes
as a primary key field.
Click Here to Expand Forum to Full Width