Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Storage space for numbers ??? Please help !
You could be empirical about is and do
select vsize(Your_number_to_test) from dual;
and that would do it.
Both are correct. an oracle number can have up to 38 signifigant digits and
can take up to 22 bytes. It does sotre it in base 100 with an offset in
scientific notation. So some numbers don't take up much room and others
take up a lot. At most they take 22 bytes. 1, 100, 1000, 10000,
1000000000000 take the same amount of storage. But 12345678.34567 takes
more than 100000000000.
The formula is acurate.
Jim
"Laszlo Papp" <laszlo.papp_at_epigenomics.com> wrote in message
news:3C767F4B.384D606C_at_epigenomics.com...
Hi,
I would like to know it exactly how much phisical storage space is used by Oracle to store a NUMBER, a NUMBER (p,s), INTEGER, FLOAT, etc, and what are the exact values of 'p' and 's' if I say INTEGER or FLOAT.
I found a page (http://www.jlcomp.demon.co.uk/faq/num_size.html) that says: Orcale uses a Base100 encoding, and that the actual space used depends on the actual number stored. (It is about 1+ceil (x/2) where x is the number of non-zero digits.)
But on the other hand, on a different page, I found the following:
Type Storage Range/Length Comments ----------------- ---------- -------------- ------------------- NUMBER 16 40 digit floating point FLOAT 16 40 digit floating point SMALLINT 16 40 digit floating point NUMBER(a,b) varies a digits, b precision FLOAT(a,b) varies a digits, b precision DECIMAL 16 40 digit INTEGER 16 40 digits INTEGER(a) varies a digits
Well. It is not an official Oracle page (nor the first one)... So it seems that if I say NUMBER or FLOAT then the used space is NOT dinamic but always 16 bytes, which is too much !
Does anybody have some treatable information on this question ? (The first page doesn't say that nothing about that it is not always dinamic, only if I explicitly define the precision and scale values...)
Thank you for your help.
Bye:
Papp Laszlo
-- Laszlo Papp Epigenomics AG www.epigenomics.com Kleine Präsidentenstr. 1. +49-30-24345-0 10178 BerlinReceived on Fri Feb 22 2002 - 20:54:46 CST
![]() |
![]() |