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 Question

Re: Storage Question

From: Mark D Powell <markp7832_at_my-deja.com>
Date: 2000/04/30
Message-ID: <8ehrbu$q4c$1@nnrp1.deja.com>#1/1

In article <957084104.14440.0.nnrp-01.9e9864e7_at_news.demon.co.uk>,   "Mark" <mark_at_mark-it.demon.co.uk> wrote:
>
> Hi,
>
> Hope this is the appropriate NG for this...
>
> How does Oracle store number columns internally? For example, if a
 table
> has a column of NUMBER(20), does each number require 20 bytes (one
 byte per
> decimal digit), or is it stored as an internal binary representation
 (8
> bytes?). Are there optimum NUMBER sizes that correspond to native
 machine
> word sizes (16 bit, 32 bit etc.)
>
> Thanks
>

The Oracle datatypes are documentated in the Concepts manual and the Application Developers Guide. Oracle stores all numberic column definitions, float, integer, number(10,2), etc... as number which is represented internally as a form of scientific notation. The storage space formula is in the Concepts manual but is something like 1 byte for the exponent + ( floor(digits/2) + 1) the mantissa + 1 byte for the sign, but this is only required if the value is 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 Sun Apr 30 2000 - 00:00:00 CDT

Original text of this message

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