Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Number Vs. Varchar2 Datatype

RE: Number Vs. Varchar2 Datatype

From: Christopher Spence <cspence_at_FuelSpot.com>
Date: Wed, 30 May 2001 08:17:57 -0700
Message-ID: <F001.003135F2.20010530054547@fatcity.com>

<FONT face=Arial color=#0000ff

size=2>VARCHAR2 is more efficient marginally for sorting and indexing.

<FONT face=Arial color=#0000ff

size=2> 
Oracle
claims numeric primary key is faster, but there has been proof otherwise.
<FONT face=Arial color=#0000ff

size=2> 
But if
your data is number, it should be stored as a number.  The speed difference is very marginal.
 
"Walking on water and developing software from a specification are easy if both are frozen." Christopher R. Spence <FONT
face="Comic Sans MS" size=2>Oracle DBA <FONT face="Comic Sans MS" size=2>Fuelspot

  <FONT face=Tahoma
  size=2>-----Original Message-----From: Arslan Dar   [mailto:arslandar_at_skm.org.pk]Sent: Wednesday, May 30, 2001 5:05   AMTo: Multiple recipients of list ORACLE-LSubject:   Number Vs. Varchar2 Datatype
  Hi list,
  We are in the design phase of our new database and   eventually there a number of feilds which are actually numeric say DEPARTMENT   NUMBER or EMPLOYEE CODE (they dont contain any alphabat or special character)   ,
  The main decision to be made right now is to choose   the right datatype, Options ofcourse are VARCHAR2 or NUMBER, i know its better   to have varchar2 cuz its a bit flexible, but i want some expert   opinion,
  can u tell me any pros and cons of having NUMBER or   Varchar2 datatype on a feild which is numeric, which may be PRIMARY KEY and   also which is NOT always used in Calculations,   which datatype is more efficient
  Its Oracle 8.1.7 on NT4,
  TIA,
  Arslan Received on Wed May 30 2001 - 10:17:57 CDT

Original text of this message

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