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: Steffen Ramlow <s.ramlow_at_gmx.de>
Date: Sun, 10 Feb 2002 18:44:18 +0100
Message-ID: <a46bj4$1cg09r$1@ID-54600.news.dfncis.de>


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

Original text of this message

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