Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> char vs. varchar for an indexed column
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
![]() |
![]() |