Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Database compression..?
On Wed, 7 Apr 1999 09:32:46 +0200, "Mark Norris"
<mark.norris_at_sap-ag.de> wrote:
>Hello, after a few hours unsuccessful surfing yesterday, i was wondering if
>anyone could point me in the right direction.
>
>I'm trying to find out information about the compression of empty fields.
>i.e. if i have a table with lots of columns, but most of them are empty,
>what does ORACLE do, does it store the empty space.?
Oracle will store only a "null" indicator (one byte) in the column if it is defined as VARCHAR2 or NUMBER datatype. If it is a fixed-length CHAR column, it will store the actual blank spaces.
If the columns are the trailing fields of the table, the null indicators will not be stored, so you'll save a few bytes there as well.
Make sure you use VARCHAR2 instead of CHAR and you'll be happier.
Also, if the columns will be updated to real values later, set the PCTFREE value of the table higher (20% maybe?). This will instruct Oracle to leave 20% of each data block free (after initial inserting) for updates to the rows stored in that block.
Chris