Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: char vs varchar2
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.
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
![]() |
![]() |