Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Not Nulls grouped as first column.....

Re: Not Nulls grouped as first column.....

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1998/03/15
Message-ID: <6eh6m6$iad@info.csufresno.edu>#1/1

Keeping your not-null columns first in the table is a good practice to save disk space. Actually, placing the most likely null items last in the table definition is the better guideline. The reason is that the database completely omits fields that are null from the end of the record when it is stored. But as soon as one of the null items at the end gets a non-null value, all of the null items ahead of it require a one-byte placeholder, taking additional space.

If your database is impacted by space limitations, or the table you are concerned with has lots of null columns, then reorganizing the table might be worthwhile.

HTH,
Steve Cosner
http://members.aol.com/stevec5088

In article <19980313152700.KAA10763_at_ladder03.news.aol.com>, Tao36 <tao36_at_aol.com> wrote:
>I've always been told to keep all my "not null" columns together at the front
>of the table. However, due to the severe effects of aging (or possibly
>environmental contaminants) I can't remember why.
>
>I have a situation in which it is a lot easier for me to "alter" a table,
>adding a new "not null" column to the end, as opposed to "dropping" the table
>and recreating it with the new column grouped at the front with all his "not
>null" buddies.
>
>What are the effects of not grouping my "not nulls"? Catastrophic? Mild
>annoyance? Was it anal to keep them together in the first place?
>
>Thanks for any enlightenment.
>Kevin
>
>
Received on Sun Mar 15 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US