Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Does having primary key at the end of table take up space
In principle it matters.
In practice you are only losing two bytes per
row when you have two blank columns at the
start of the table, as Oracle will be using
two bytes (one per column) to record the
fact that the column is empty. These
bytes are not needed for empty columns
at the end of the row because there is
a 'used column count' at the start of the
row.
-- Jonathan Lewis Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk tim.mcconechy_at_runtime.dk wrote in message <8aatqb$cu0$1_at_nnrp1.deja.com>...Received on Fri Mar 10 2000 - 00:00:00 CST
>HI!
>
>I was wondering about a comment a colleque made and if it is correct or
>not. Does having a PK at the end of the table take up unneccessary space
>when they are left as null?
>
>Say I have a Table like:
>CHK10MEMO VARCHAR2(4000)
>CHK20MEMO VARCHAR2(4000)
>RECNO NOT NULL NUMBER(20)
>USER_NAME VARCHAR2(15)
>LASTEDIT DATE
>
>And the columns Chk10memo and chk20memo
>contain no data.
>
>Because the recno field is required and filled in does this mean we are
>taking up space up to this point on the other columns?
>
>Would it be better to do:
>
>RECNO NOT NULL NUMBER(20)
>USER_NAME VARCHAR2(15)
>LASTEDIT DATE
>CHK10MEMO VARCHAR2(4000)
>CHK20MEMO VARCHAR2(4000)
>
>I tried to varify this claim on 8.0.5 and it seemed to not be a problem.
>
>
>Thanks a lot
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
![]() |
![]() |