Re: char vs varchar2

From: Robert Hart <rhart_at_gov.edmonton.ab.ca>
Date: 1998/05/22
Message-ID: <35652ac5.1_at_champ>#1/1


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 - 00:00:00 CEST

Original text of this message