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: Papa John's International, Inc. <dlicciardi_at_tcipro.com>
Date: 27 May 1998 19:31:25 GMT
Message-ID: <01bd88da$4ef0e4a0$535173ce@sdaly.papajohns.com>


Two things here. 1 character is not enough for a large table when it comes to a primary key. Set your primary key to be something else. If that one character is that significant then think about it's cardinality. Assuming there is not more than 31 different values that can be in that one character field, it would be usefull to create a secondary index on that field that is a bitmapped index. Bit mapped indexes are much quicker than normal indexes when coupled with a binary -tree primary key.



Derek Licciardi
dlicciardi_at_tcipro.com

yren_at_epsilon.com wrote in article <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.
>
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
Received on Wed May 27 1998 - 14:31:25 CDT

Original text of this message

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