Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Space allocation for Number datatype
On Wed, 04 Mar 1998 11:10:56 -0500, Tansel Ozkan <tansel_at_openix.com> wrote: Hi,
excerpt from Oracle's Administration Guide:
Datatype
Description Column Length (bytes) CHAR (size) Fixed length character data of length size. Fixed for every row in the table (with trailing spaces); maximum size is 255 bytes per row, default size is one byte per row. Consider the character set that is used before setting size. (Are you using a one or two byte character set?) VARCHAR2 (size) Variable length character data. A maximum size must be specified. Variable for each row, up to 2000 bytes per row. Consider the character set that is used before setting size. (Are you using a one or two byte character set?) NUMBER (p, s) Variable length numeric data. Maximum precision p and/or scale s is 38. Variable for each row. The maximum space required for a given column is 21 bytes per row. DATE Fixed length date and time data, ranging from January 1, 4712 B.C. to December 31, 4712 A.D. Default format: DD-MON-YY. Fixed at seven bytes for each row in the table. LONG Variable length character data. Variable for each row in the table up to 2^31 bytes, or two gigabytes, per row. RAW (size) Variable length raw binary data. A maximum size must be specified. Variable for each row in the table, up to 255 bytes per row. LONG RAW Variable length raw binary data. Variable for each row in the table, up to 2^31 bytes, or two gigabytes, per row. ROWID Binary data representing row addresses. Fixed at six bytes for each row in the table. MLSLABEL Variable length binary data representing OS labels. Variable for each row in the table, ranging from two to five bytes per row.
>Dear Oracle Experts,
>
>I am planning on adding about 100 numeric fields to a 100,000 record
>table. This is a DSS application so we are not concerned about
>normalizing the data. My question is how the numeric fields are stored
>in Oracle internally. I mean, does Oracle allocate less space for a
>Number(6) compared to Number(10) or specifying a length is necessary for
>controlling the data allowed in that field? If the length of the column
>makes a big difference in space allocation, I will keep the precision to
>a minimum.
>
>Tansel Ozkan
>Macrosoft, Inc.
-- Regards Matthias Gresz :-) GreMa_at_T-online.deReceived on Thu Mar 05 1998 - 00:00:00 CST