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: Estimate row length and INT to NUMBER(38)

Re: Estimate row length and INT to NUMBER(38)

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 2000/03/17
Message-ID: <q405ds0i5t7eif5ljldhpkq64vjlv0s3ef@4ax.com>#1/1

A copy of this was sent to "Maggie" <maggiezhou_at_hotmail.com> (if that email address didn't require changing) On Thu, 16 Mar 2000 14:18:01 -0800, you wrote:

>One of developer in my company generated Sequence number from 1 increment
>with 1 and define sequence as INT. However, Oracle convert INT to
>NUMBER(38). I try to estimate the table size. I dont know how to
>calculate the row length becasue number is variable-length data type and the
>sequence generated only occupy serveral digits but it show as NUMBER(38).
>This developer defined many columns as INT and finally he got many
>NUMBER(38) length columns. Do I need ask him to change his table
>definition?
>
>
>

All numbers are always stored as variable length fields -- there is no such thing as a "4 byte number" in Oracle. All of them are variable length.

The int column is simply an "edit" that says -- store any integer with upto 38 digits of precision. It may consume between 0 and 22 bytes of space.

The only thing you could do is ask them to use number(N) with N is the max number of digits they would ever want. That'll put a lower upper bound on the number of digits they could store.

-- 
http://osi.oracle.com/~tkyte/
 
Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Fri Mar 17 2000 - 00:00:00 CST

Original text of this message

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