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: VARCHAR2 vs. CHAR

Re: VARCHAR2 vs. CHAR

From: Tim Witort <trw_at_medicalert.org>
Date: 1997/04/04
Message-ID: <33459056.5FBE@medicalert.org>#1/1

Guy Harrison wrote:
> > Could someone shed some light on the difference between using CHAR and
> > VARCHAR2 for strings? I understand that VARCHAR2 will be more efficient
> > storage-wise by only using as many characters as the input string
> > requires, but I have also heard that performance may be negatively
> > impacted with VARCHAR2 types because Oracle must look up the length of
> > the strings all the time.

Be nice to yourself, never make a column of type CHAR in any Oracle DB from version 7.0 on. Use VARCHAR2 for everything from 1 character wide fields up to the limit of 2000 character wide fields. LOTS of things start acting really wierd when you use CHAR type columns. Comparisons don't work right in some applications and general, needless grief abounds.

Received on Fri Apr 04 1997 - 00:00:00 CST

Original text of this message

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