Oracle - number(x,y) alokovana velikost

Jan Serak sherry na pikebo.cz
Pondělí Říjen 10 12:47:24 CEST 2005


Novák Jiří wrote:
> Zdravim!
> 
> Zajimalo by mne jestli pri internim ulozeni typu number se bere server v 
> uvahu pozadavanou velikost.

Internal Numeric Format
Oracle stores numeric data in variable-length format. Each value is 
stored in
scientific notation, with 1 byte used to store the exponent and up to 20 
bytes to store
the mantissa. The resulting value is limited to 38 digits of precision. 
Oracle does not
store leading and trailing zeros. For example, the number 412 is stored 
in a format
similar to 4.12 x 102, with 1 byte used to store the exponent(2) and 2 
bytes used to
store the three significant digits of the mantissa(4,1,2). Negative 
numbers include
the sign in their length.
Table 12-1 How Scale Factors Affect Numeric Data Storage
Input Data Specified As Stored As
7,456,123.89 NUMBER 7456123.89
7,456,123.89 NUMBER(*,1) 7456123.9
7,456,123.89 NUMBER(9) 7456124
7,456,123.89 NUMBER(9,2) 7456123.89
7,456,123.89 NUMBER(9,1) 7456123.9
7,456,123.89 NUMBER(6) (not accepted, exceeds precision)
7,456,123.89 NUMBER(7,-2) 7456100


> 
> Podedil jsem primarni klice definovane jako number(10) a z hlediska 
> ulozeni a velikosti indexu se mi to nezda moc optimalni.

Proc?

> 
> nevim jestli interne neni number ulozen jako int64 + scale + signum.
> ma cenu se zajimat jaka velikost se vejde do jakeho INT-u ?

Nema.

> Dekuji za Vas Cas

Neni zac ;-)

Jan Serak



Další informace o konferenci Databases