Performance difference between VARCHAR2 and NUMBER

If I query my database (Oracle) with a unique index in multiple columns, will there be a performance difference if I change one of the columns from VARCHAR2 to NUMBER?
If so, is it significant ?

(This is varchar2 because I need a "0" at the beginning, but I can change it at the presentation level in my application)

+5
source share
2 answers

More knowledgeable people than me tell me that in Oracle, the performance difference between number and varchar2 is completely dependent on your data, as they have very similar views inside. See the following:

https://asktom.oracle.com/pls/apex/f?p=100:11:59::::P11_QUESTION_ID:2669498700346402356

but also see the Internal Digital Format section:

http://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT012

If, for example, your varchar data was actually single characters (for example, "Y", "N"), you would probably be better off with varchars than with numbers. If you have less than 100 codes, but your string equivalents were 8 characters long, you probably would be better off with numbers than with varchars.

+3
source

, NUMBER. , , . , .

+4

All Articles