Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: char vs. varchar for an indexed column
ok, of coz i do not rpad or rtrim everything in sight :-))
and the reason is ok?:
> > i think varchar, because the index is much smaller -> less i/o -> better
> > performance
"damorgan" <dan.morgan_at_ci.seattle.wa.us> wrote in message
news:3C645679.2E8E4EC6_at_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 Sun Feb 10 2002 - 11:44:18 CST