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: What really is NUMBER under the covers

Re: What really is NUMBER under the covers

From: <markp7832_at_my-deja.com>
Date: Sat, 05 Feb 2000 21:33:20 GMT
Message-ID: <87i4v0$j9c$1@nnrp1.deja.com>


In article <87d8ln$j9d$1_at_gxsn.com>,
  "Mark Hodges" <mark_at_hodges-technologies.co.uk> wrote:
> Ken Sproule wrote in message ...
> >I would like to thank everyone in advance for your help.
> >
> >My question is simply that I need to know exactaly what Oracle does
> >with a NUMBER(10,2) internally. I mean, How much space is actually
> >consumed on the disk in storage AND where is this documented.
> >
>
> In the one of the appendices of the administrators guide (might be the
> server reference) it tells you how to estimate rowsize for objects
based on
> field sizes, some constants you can find in a v$ view and a few rules
of
> thumb. I believe the column lengths come from dba_tab_columns.
>

Oracle stores all values of type number in variable length scientific notation. You can find this in the Concepts manual chapter on datatypes. The formula for size is something like 1 + floor(digits/2) + 1 + 1 again if negative. That is 1 for the exponent plus one byte for every 2 digits rounded up and another byte for the sign, but apparantly the sign byte is only required if negative.

--
Mark D. Powell -- The only advice that counts is the advice that  you follow so follow your own advice --

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Feb 05 2000 - 15:33:20 CST

Original text of this message

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