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

Home -> Community -> Usenet -> c.d.o.server -> Re: VARCHAR length

Re: VARCHAR length

From: Karsten Farell <kfarrell_at_medimpact.com>
Date: Tue, 08 Oct 2002 17:50:41 GMT
Message-ID: <OUEo9.1522$qr6.192908583@newssvr13.news.prodigy.com>


Eino Komsi wrote:
> hi,
>
> Is there a difference between VARCHAR(100), VARCHAR(300) or
> VARCHAR(2000).
>
> I mean, is there really a difference if I have 140Gt of hard disk
> space, and I specify a field to be 300 instead of possible 2000.
> Performance?
>
> regards,
> Eino Komsi

Not much difference to Oracle - it stores the length and actual characters (no right padding). Could be confusing to developers, depending on context - how many characters do I allow for in an input field or in a (wrapped?) report column? Have you ever displayed some of those mega-lengthy fields in sqlplus (which is why I used TOAD)?

However, a pet peeve of mine is that people sometimes claim VARCHAR2 is better than CHAR, so they make a status field VARCHAR2(1). I wonder why they feel the need to store a length byte and a one-byte column? Oh well, maybe they do it so their datatypes all line up in the create table command. And maybe it's just my bias because I grew up in the days when disk space was scarce and expensive. Received on Tue Oct 08 2002 - 12:50:41 CDT

Original text of this message

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