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: Guy Harrison <gharriso_at_werple.net.au>
Date: 1997/04/04
Message-ID: <01bc4084$0f60e3c0$792a11cb@gharriso>#1/1

BoB Pierce <rjpierce_at_bga.com> wrote in article <334183EF.4E1B_at_bga.com>...
> 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.

Any small overhead required to lookup string lengths would usually be overwhelmed by the reduction in buffer cache efficiency (less rows per block) and table scan performance (more blocks to scan) resulting from the longer row length.

If performance is your concern, I'd suggest VARCHAR2.

-- 
Guy Harrison

gharriso@werple.net.au || http://werple.net.au/~gharriso || 613 419377964
Received on Fri Apr 04 1997 - 00:00:00 CST

Original text of this message

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