This is an automated analysis of the DBI:mysql:database=expmanftp;host=db3 database for migration into MySQL Cluster. No warranty is made to the accuracy of the information.
This information should be valid for MySQL 4.1 and 5.0. Since 5.1 is not a final release yet, the numbers should be used as a guide only.
5.1-dd is for tables stored on disk. The ndb_size.pl estimates are experimental and should not be trusted. Notably we don't take into account indexed columns being in DataMemory versus non-indexed on disk.
NOTE the configuration parameters below do not take into account system tables and other requirements.
| Parameter | 4.1 | 5.0 | 5.1 |
|---|---|---|---|
| DataMemory (kb) | 1536 | 1536 | 736 |
| IndexMemory (kb) | 328 | 192 | 192 |
| MaxNoOfTables | 2 | 2 | 2 |
| MaxNoOfAttributes | 14 | 14 | 14 |
| MaxNoOfOrderedIndexes | 4 | 4 | 4 |
| MaxNoOfUniqueHashIndexes | 4 | 4 | 4 |
| MaxNoOfTriggers | 16 | 16 | 16 |
Usage is in kilobytes. Actual usage will vary as you should set the parameters larger than those listed in the table above.
| Parameter | 4.1 | 5.0 | 5.1 |
|---|---|---|---|
| Attributes | 3 | 3 | 3 |
| Tables | 40 | 40 | 40 |
| OrderedIndexes | 40 | 40 | 40 |
| UniqueHashIndexes | 60 | 60 | 60 |
| Column | Type | VARSIZE | Size | Key | 4.1 NDB Size | 5.0 NDB Size | 5.1 NDB Size |
|---|---|---|---|---|---|---|---|
| members | varchar | YES | 16 | 20 | 20 | 8 | |
| groupname | varchar | YES | 16 | MUL | 20 | 20 | 12 |
| gid | smallint | 6 | 4 | 4 | 4 | ||
| HIDDEN_NDB_PKEY | bigint | 8 | PRI | 8 | 8 | 8 |
We assume that indexes are ORDERED (not created USING HASH). If order is not required, 10 bytes of data memory can be saved per row if the index is created USING HASH
| Index | Type | Columns | 4.1 IdxMem | 5.0 IdxMem | 5.1 IdxMem | 4.1 DatMem | 5.0 DatMem | 5.1 DatMem |
|---|---|---|---|---|---|---|---|---|
| groupname | BTREE | groupname | 45 | 25 | 25 | 10 | 10 | 10 |
| PRIMARY | BTREE | HIDDEN_NDB_PKEY | 33 | 25 | 25 | 10 | 10 | 10 |
| 4.1 | 5.0 | 5.1 | |
|---|---|---|---|
| Nr Varsized Attributes | 0 | 0 | 2 |
| Row Overhead | 16 | 16 | 16 |
| Varsized Overhead | 0 | 0 | 20 |
| Column DataMemory/Row | 44 | 44 | 24 |
| Index DataMemory/Row | 20 | 20 | 20 |
| Total DataMemory/Row | 80 | 80 | 80 |
| Rows per 32kb page | 408 | 408 | 408 |
| Current number of rows | 1 | 1 | 1 |
| Total DataMemory (kb) | 32 | 32 | 32 |
| 4.1 | 5.0 | 5.1 | |
|---|---|---|---|
| IndexMemory/Row | 78 | 50 | 50 |
| Rows per 8kb page | 105 | 163 | 163 |
| Current number of rows | 1 | 1 | 1 |
| Total IndexMemory (kb) | 8 | 8 | 8 |
| Column | Type | VARSIZE | Size | Key | 4.1 NDB Size | 5.0 NDB Size | 5.1 NDB Size |
|---|---|---|---|---|---|---|---|
| count | int | 11 | 4 | 4 | 4 | ||
| uid | smallint | 6 | 4 | 4 | 4 | ||
| userid | varchar | YES | 32 | UNI | 36 | 36 | 16 |
| modified | datetime | 8 | 8 | 8 | |||
| homedir | varchar | YES | 255 | 256 | 256 | 52 | |
| passwd | varchar | YES | 32 | 36 | 36 | 12 | |
| id | int | 10 | PRI | 4 | 4 | 4 | |
| shell | varchar | YES | 16 | 20 | 20 | 12 | |
| accessed | datetime | 8 | 8 | 8 | |||
| gid | smallint | 6 | 4 | 4 | 4 |
We assume that indexes are ORDERED (not created USING HASH). If order is not required, 10 bytes of data memory can be saved per row if the index is created USING HASH
| Index | Type | Columns | 4.1 IdxMem | 5.0 IdxMem | 5.1 IdxMem | 4.1 DatMem | 5.0 DatMem | 5.1 DatMem |
|---|---|---|---|---|---|---|---|---|
| userid | BTREE | userid | 61 | 25 | 25 | 10 | 10 | 10 |
| PRIMARY | BTREE | id | 29 | 25 | 25 | 10 | 10 | 10 |
| 4.1 | 5.0 | 5.1 | |
|---|---|---|---|
| Nr Varsized Attributes | 0 | 0 | 4 |
| Row Overhead | 16 | 16 | 16 |
| Varsized Overhead | 0 | 0 | 32 |
| Column DataMemory/Row | 380 | 380 | 124 |
| Index DataMemory/Row | 20 | 20 | 20 |
| Total DataMemory/Row | 416 | 416 | 192 |
| Rows per 32kb page | 78 | 78 | 170 |
| Current number of rows | 3615 | 3615 | 3615 |
| Total DataMemory (kb) | 1504 | 1504 | 704 |
| 4.1 | 5.0 | 5.1 | |
|---|---|---|---|
| IndexMemory/Row | 90 | 50 | 50 |
| Rows per 8kb page | 91 | 163 | 163 |
| Current number of rows | 3615 | 3615 | 3615 |
| Total IndexMemory (kb) | 320 | 184 | 184 |
This is the output of ndb_size.pl.