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

Home -> Community -> Usenet -> c.d.o.misc -> Re: CHAR vs VARCHAR

Re: CHAR vs VARCHAR

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Wed, 02 Apr 2003 16:26:55 GMT
Message-ID: <MPG.18f4af2c267fe049989715@news.la.sbcglobal.net>


paulrp_at_earthlink.net said...
> Greetings,
> What is the savings of CHAR(4) vs VARCHAR(4) for storing a 4 (required)
> character code? What is the overhead in using VARCHAR for fields of required
> length?
> Thanks,
> -Paul Pruchnik
>

This is some kind of deja vu! It sounds very much like the discussions all us developers had back in the 1950s and 1960s when disk space was very expensive. It's the whole reason we had that Y2K thingy a few years back ... we - me included - sacrificed everything at the altar of consuming the smallest amount of disk space.

With such a small field (4 bytes or characters, depending on your NLS setting), does it really matter in the 21st Century? If I had a preference in this case, I'd go with the CHAR(4).

-- 
/Karsten
DBA > retired > DBA
Received on Wed Apr 02 2003 - 10:26:55 CST

Original text of this message

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