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

Home -> Community -> Usenet -> c.d.o.server -> Re: Storage of long record

Re: Storage of long record

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 24 Sep 2001 18:30:03 +0200
Message-ID: <tquo8oojlmm4c1@news.demon.nl>

<PatrickJ_at_kneip.com> wrote in message news:3baedc58_1_at_news.vo.lu...
> Hi,
>
> I am working on Oracle 8.1.7, and I am looking for the best way to store
> records with a lot of fields. Knowing that half of the fields will be
> almost always present, and the other half will be present in only 10% of
> the records, what is the best choice:
> - Create 2 tables, one containing the fields that are almost always
> present, and the other containing the fields rarely present. By this way,
> I can spare the space of the rarely present fields in 90% of the cases,
> but programming is more complex.
> - Create only 1 table with all the fields. In this case, does Oracle
> optimise the storage, or does it reserve space even if the fields are
> Null?
> - Other suggestion?
>
> Thank you for your help.
>
> Patrick J.

If the nulls are trailing they won't use any space. A non-trailing null will use the appropiate number of length bytes.

IMO, the best and only reason to split something into 2 tables is to avoid chaining (ie the record is longer than 1 block by design)

Hth,

Sybrand Bakker, Senior Oracle DBA Received on Mon Sep 24 2001 - 11:30:03 CDT

Original text of this message

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