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. varchar for an indexed column

Re: char vs. varchar for an indexed column

From: damorgan <dan.morgan_at_ci.seattle.wa.us>
Date: Fri, 08 Feb 2002 22:51:37 GMT
Message-ID: <3C645679.2E8E4EC6@ci.seattle.wa.us>


Unless you have some phenomenal desire to RPAD or RTRIM everything in sight ... VARCHAR. Daniel Morgan

Steffen Ramlow wrote:

> table folder
> id varchar(30) primary key
> path varchar(500) null
>
> the table represents a hierarchial folder structure, path is like in
> filesystem - the id's concatenated by "/"
>
> f1
> f1.1
> f1.1.1
> f2
>
> id name path
> 1 f1 /1
> 2 f1.1 /1/2
> 3 f1.1.1 /1/2/3
> 4 f2 /4
>
> so what is better for id: char(30) or varchar(30)
> and what is better for path, char or varchar
>
> i think varchar, because the index is much smaller -> less i/o -> better
> performance
>
> am i right?
Received on Fri Feb 08 2002 - 16:51:37 CST

Original text of this message

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