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: char vs. varchar

Re: char vs. varchar

From: <tedchyn_at_yahoo.com>
Date: Sat, 09 Jan 1999 15:34:07 GMT
Message-ID: <777stf$ejp$1@nnrp1.dejanews.com>


When you compare varchar2 to another varchar2 field oracle will append the shorter field to make two comparing fields equal length before comparison and this does not happen when char is compare vs a varchar2 field.

Ted Chyn
In article <3696c3a4.176847838_at_news.cwix.com>,   dperez_at_juno_nospam.com wrote:
> I was told by one of my DBA instructors that whenever possible varchar should
be
> used. Supposedly it is much quicker to read or write varchars than to
retrieve
> or write the fixed length chars.........
>
> BUT, one question I've always wondered about is if the system doesn't know how
> long a varchar is going to be, and it only allocates the space in the record
for
> whatever the original size of the field is, then if the field length is
> increased doesn't the database have to store the additional characters in an
> overflow area of the block? In which case it would have to do MORE I/Os...
>
> In any case, my recollection is the system is optimized to use
varchars........
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sat Jan 09 1999 - 09:34:07 CST

Original text of this message

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