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: which column type char,varchar2 is better for index?

Re: which column type char,varchar2 is better for index?

From: Paul Brewer <nothing_at_nowhere.com>
Date: Mon, 14 Jun 2004 20:44:59 +0100
Message-ID: <40ce00c6$2_1@mk-nntp-1.news.uk.worldonline.com>


"Mark D Powell" <Mark.Powell_at_eds.com> wrote in message news:2687bb95.0406110545.e66f62f_at_posting.google.com...
<snip>

I agree with Daniel on the use of varchar2 over char every time.
<snip>

Maybe almost, but not *quite* every time. I recall posting a suggestion about 8 years ago which was along the lines of 'always use varchar2 and never use char'.

Thomas Kyte was kind enough to point out that:

  1. There could possibly be a scenario (7.3) where you wanted to set up a row with lots of null or small values, which you knew would shortly be filled to a defined length.
  2. 'Always' and 'never' are absolute terms, and (I paraphrase), it always depends...

I have never forgotten that advice.

Regards,
Paul Received on Mon Jun 14 2004 - 14:44:59 CDT

Original text of this message

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