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

char vs. varchar for an indexed column

From: Steffen Ramlow <s.ramlow_at_gmx.de>
Date: Fri, 8 Feb 2002 14:07:55 +0100
Message-ID: <a40ikr$1b4egq$1@ID-54600.news.dfncis.de>


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 - 07:07:55 CST

Original text of this message

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