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 varchar2

Re: char vs varchar2

From: Robert Hart <rhart_at_gov.edmonton.ab.ca>
Date: Fri, 22 May 1998 08:36:12 -0600
Message-ID: <35652ac5.1@champ>

yren_at_epsilon.com wrote in message <6k23qn$3s4$1_at_nnrp1.dejanews.com>...
>I have a large table. Its primary index is one character string.
>Could anyone tell me which datatype ( char(1) or varchar2(1) )
>I should use? What are advantages in terms of performance?
>

>Thanks.
>
>

I hope by Primary index you don't mean primary key. Using a string as a Primary key. Exactly how big is this string?

I crimge in horror remembering the database I had to support on one contract where the primary key was a char(512).

regardless go with varchar2. It will use less physical space on the drive and will be quicker as a result.

l8r
Rob Received on Fri May 22 1998 - 09:36:12 CDT

Original text of this message

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