Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Storage space needed for a numeric(15)

Re: Storage space needed for a numeric(15)

From: <markp7832_at_my-deja.com>
Date: Fri, 04 Feb 2000 17:13:52 GMT
Message-ID: <87f1ca$egr$1@nnrp1.deja.com>


In article <389AD795.B64F18C9_at_free.fr>,   =?iso-8859-1?Q?Fran=E7ois?= de Rochebrune <fderochebrune_at_free.fr> wrote:
> Hi,
>
> I am planning to create a table using several numeric values from 0 to
> 10 power 15.
> The table will contain millions of records and I am trying to evaluate
> the disk space needed to store the whole database.
> My question is :
> How much space will a numeric(15) field occupy ?
> Will each value occupy 15 bytes ?
> Or is there a binary conversion applied so the space could be 7
bytes ?
> (10 power 15 is approx. 2 power 52, which could fit in 52 bits - less
> than 7 bytes)
>
> Thanks for the answer here or at FdeRoche_at_aol.com
>

Oracle stores all numbers internally in the rdbms as variable length scientific notation and there is a space formula in the Concepts manual which is something like: 1 + ( floor(num_digits/2) + 1 ) + 1 where this last + 1 is only needed for negative numbers.

--
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 Fri Feb 04 2000 - 11:13:52 CST

Original text of this message

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