Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: which column type char,varchar2 is better for index?
Note in-line.
-- Regards Jonathan Lewis http://www.jlcomp.demon.co.uk http://www.jlcomp.demon.co.uk/faq/ind_faq.html The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/seminar.html Optimising Oracle Seminar - schedule updated May 1st "Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message news:1087071115.755274_at_yasure...Received on Sun Jun 13 2004 - 06:31:27 CDT
>
> > This is not a valid reason, but I use CHAR(1) in place of the
non-existant
> > Boolean (no, I don't want to argue about the need for Boolean data), or
> > maybe for a flag. Just for ease when scanning designs and so on.
>
It sounds like a perfectly valid reason to me. Standards that do no harm and add clarity to structure and code are always valid.
> But do keep in mind that 0 and 1 would be more efficient for that purpose.
>
Depends where you want the efficiency - from an Oracle viewpoint, 0 is stored as 0x1 0x80 1 is stored as 0x2 0xC1 0x02 which is arguably less efficient than the character equivalent.