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
Null values in columns does not take space. this is independent of the column position in the table.
tim.mcconechy_at_runtime.dk wrote:
> 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.
Received on Thu May 04 2000 - 00:00:00 CDT