Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Size of NUMBER field
I read somewhere that a NUMBER with unspecified precision
takes up 22 bytes, but upon testing it with a table, I find this isn't
so.
If I enter a 1 digit number, the row becomes 6 bytes long.
If I enter a 5 digit number, the row becomes 8 bytes long.
If I enter an 8 digit number, the row becomes 9 bytes long.
If I enter a 12 digit number, the row becomes 11 bytes long -
Etc.,
I got these by analyzing the table and select avg_row_len on a table
with only
1 row, and one column, a NUMBER with no precision.
A physical model was just reviewed and the suggestion was made to change
any unspecified NUMBER fields to have length and/or precision.
I guess I wondering though that if NUMBER doesn't hog 22 bytes
automatically,
and there are no conflicts with the application, it seems it's not
important
as I thought it was. Any thoughts?