Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Char versus VarChar(2)
As another poster mentioned - you only have to worry about the overhead if you have a very busy database - but there is another concern.
We always use VARCHAR2 fields - no matter what the length. A little while ago I had a contracter use some short CHAR fields and applications written by my own staff started to have problems when reading that field. The problem was that a CHAR(1) field always has a length of 1 - even when blank - it contains a space. VARCHAR2 fields don't. Trivial but annoying. The short fields are now VARCHAR2 and behave in a way that everyone expects.
Neither behaviour is right||wrong - you just have to understand the way the datatypes work.
Mike
-- Open System Engineer, Cargill INC, UK Bill Buchan wrote in message <6n851o$rqb$1_at_phys-ma.sol.co.uk>...Received on Thu Jul 02 1998 - 00:00:00 CDT
>Is there a specific overhead associated with varchar or varchar2 which
would
>mean that using char instead would be more efficient for short strings?
ie.
>Are things like varchar2(3) or varchar2(5) sensible/preferable to char(3)
or
>char(5)?
![]() |
![]() |