Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Implementation of boolean types.
Matthias Hoys wrote:
> "Frank van Bortel" <frank.van.bortel_at_gmail.com> wrote in message > news:db6cjj$obt$2_at_news1.zwoll1.ov.home.nl... >
> > > CHAR(1) takes up less space ? > >
I was afraid you were going to say that...
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
SQL> create table t1 (col1 char(1));
Table created.
SQL> create table t2 (col1 varchar2(1)); Table created.
SQL> create table t3 (col1 number(1));
Table created.
SQL> insert into t1 values ('A');
1 row created.
SQL> insert into t2 values ('A');
1 row created.
SQL> insert into t3 values (0);
1 row created.
SQL> select dump(col1) from t1;
DUMP(COL1)
SQL> select dump(col1) from t2;
DUMP(COL1)
SQL> select dump(col1) from t3;
DUMP(COL1)
All I see, is a length of 1! And really, since when is space
an argument again?
Are you willing to code bitands and xors, just to save a few
byte, or will you just use the "Gender" column (Oh dear! One
full column - bet we can use the "married" column, and bitwise
operate on them, and save some space...).
Thought so.
-- Regards, Frank van BortelReceived on Sun Jul 17 2005 - 06:04:26 CDT