Re: Table's pctfree value
Date: 1995/07/13
Message-ID: <shatzmanDBoILw.HMK_at_netcom.com>#1/1
Stefano UNTERNAEHRER (unter_at_mecati.mecasoft.ch) wrote:
: Please clear or confirm this sentences (Oracle7):
: 1) A VARCHAR2 datatype columns only allocates the needed space,
: while a CHAR datatype columns allocates the space for all the
: possible chars.
: (This MUST be right!)
True (except for nulls).
You can verify this by using the VSIZE function.. SELECT VSIZE(colname) FROM <table>.
: 2) A NUMBER datatype columns always allocates the space for all
: the possible digits.
NOT TRUE. Again, you can see this with vsize. Except for small numbers,
use this rule... CEIL(num_digits/2) + 1
: 3) A DATE datatype columns always allocates the space for a date,
: (7 bits).
True
: If sentences 2 and 3 are right, then:
: 4) A table having only NUMBER and/or DATE as columns datatype
: is supposed to have pctfree=0, because no future updates will
: require extra space.
Since 2 is false, be real careful with pctfree=0. Chaining can hurt you
a lot more then the extra space needed.
: 5) An index is supposed to always have pctfree=0, because his
: values (table's primary keys) will be never changed.
NOT TRUE. I'm not an expert on indexes, b-trees, etc, so i always use 10
to be safe (i'm open to suggestions!)
Barry
*--------------------*
Barry Shatzman
Principal Consultant
InfoBasics, Inc. Received on Thu Jul 13 1995 - 00:00:00 CEST