Oracle 5.0 Reference Manual page 879

Table of Contents

Advertisement

the user, then a "hidden" primary key will be created by NDB. This hidden primary key consumes 31-35
bytes per table record.
You may find the
Perl script connects to a current MySQL (non-Cluster) database and creates a report on how much
space that database would require if it used the
"ndb_size.pl
Storage Requirements for Numeric Types
Data Type
TINYINT
SMALLINT
MEDIUMINT
INT,
INTEGER
BIGINT
FLOAT(p)
FLOAT
DOUBLE
[PRECISION],
DECIMAL(M,D),
BIT(M)
The storage requirements for
As of MySQL 5.0.3, values for
decimal (base 10) digits into four bytes. Storage for the integer and fractional parts of each value are
determined separately. Each multiple of nine digits requires four bytes, and the "leftover" digits require
some fraction of four bytes. The storage required for excess digits is given by the following table.
Leftover Digits
0
1
2
3
4
5
6
7
8
Before MySQL 5.0.3,
bytes if
> 0,
D
Storage Requirements for Date and Time Types
Data Type
DATE
TIME
DATETIME
TIMESTAMP
Storage Requirements for Numeric Types
utility to be useful for estimating
ndb_size.pl
— NDBCLUSTER Size Requirement
REAL
NUMERIC(M,D)
DECIMAL
DECIMAL
columns are represented as strings and storage requirements are: M+2
DECIMAL
bytes if
= 0, D+2 if
M+1
D
NDBCLUSTER
Estimator", for more information.
Storage Required
1 byte
2 bytes
3 bytes
4 bytes
8 bytes
4 bytes if 0 <=
<= 24, 8 bytes if 25 <=
p
4 bytes
8 bytes
Varies; see following discussion
approximately (M+7)/8 bytes
(and NUMERIC) are version-specific:
columns are represented using a binary format that packs nine
Number of Bytes
0
1
1
2
2
3
3
4
4
M < D
Storage Required
3 bytes
3 bytes
8 bytes
4 bytes
859
storage requirements. This
NDB
storage engine. See
Section 17.4.18,
<= 53
p

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents