Re: 2 questions

From: Brett Neumeier <neumebm_at_hpd.abbott.com>
Date: 1997/09/11
Message-ID: <3417FBBB.E6DB4FE6_at_hpd.abbott.com>#1/1


David Rajaratnam wrote:

> 1) What sort of percision does the DATE type go to? From what
> I can gather it only does to the nearest second. Is this
> correct?

Yes, you are correct. If you need time with a granularity ofhundredths of a second, you can obtain it by querying the fixed table V$TIMER, which exists specifically for that purpose.

> 2) Does oracle allocate space for entries in a record that
> have no data in them? [..]

Well, sort of. If there are null columns at the END of a record, none of them take up any space. Null columns which aren't at the end of the record take up one byte each. For example, with a table structure:

create table my_table (col1 char(5), col2 char(5), col3 char(5),  col4 char(5), col5 char(5), col6 char(5), col7 char(5))

the record ('qq', null, 'xx', null, null, null, null) would occupy 11 bytes: five for each of the non-null columns, and one byte as a placeholder for col2.

This is why you want to specify a correct PCTFREE value for a table -- tables where columns frequently start off NULL and eventually are updated to have values in those columns will have their records growing in actual size over time. If PCTFREE is not high enough for such tables, this will result in row chaining.

Hope this helps.

-bn
neumebm_at_hpd.abbott.com Received on Thu Sep 11 1997 - 00:00:00 CEST

Original text of this message