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: Database compression..?

Re: Database compression..?

From: Chris Hamilton <ToneCzar_at_erols.com>
Date: Wed, 07 Apr 1999 11:59:56 GMT
Message-ID: <370c4803.1624235@news.erols.com>


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



Chris Hamilton -- toneczar_at_erols.com
Oracle DBA -- Wall Street Sports
http://www.wallstreetsports.com/ Received on Wed Apr 07 1999 - 06:59:56 CDT

Original text of this message

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