storage requirements for ndb cluster
The documentation status the following for varchar storage in 5.1 (http://dev.mysql.com/doc/refman/5.1/en/storage-requirements.html)
The NDBCLUSTER storage engine in MySQL 5.1 supports variable-width columns. This means that a VARCHAR column in a MySQL Cluster table requires the same amount of storage as it would using any other storage engine, with the exception that such values are 4-byte aligned. Thus, the string 'abcd' stored in a VARCHAR(50) column using the latin1 character set requires 8 bytes (rather than 6 bytes for the same column value in a MyISAM table). This represents a change in behavior from earlier versions of NDBCLUSTER, where a VARCHAR(50) column would require 52 bytes storage per record regardless of the length of the string being stored.
I don't understand this. 'abcd' is already a multiple of 4. why is it taking up 8 bytes of storage? i thought MyISAM it would be 4 bytes + 1 for length for varchars less than 255? so the size of length of the data in cluster is bytes?
Some one please help. my sizing is off significantly for the following table:
mysql> describe SK1;
+------------------+--------------+------+-----+-------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+--------------+------+-----+-------------------+-------+
| A | varchar(255) | NO | | | |
| B | varchar(255) | NO | | | |
| C | char(1) | NO | | | |
| D | timestamp | YES | | CURRENT_TIMESTAMP | |
| E | char(1) | YES | | | |
| F | char(1) | YES | | | |
+------------------+--------------+------+-----+-------------------+-------+
i am assuming 40 bytes per row for data where A is avg. 12 and b is avg. size is 12.
and all other fields are populated and the char(1)s take 4 bytes. 16 bytes per row for record over head.
for 250000 records i get only 1/2 in with 15M allocated for data memory.
Subject
Views
Written By
Posted
storage requirements for ndb cluster
1734
June 05, 2006 05:37AM
1286
June 05, 2006 09:01AM
1141
June 05, 2006 01:53PM
1228
June 06, 2006 11:37PM
1106
June 13, 2006 04:20AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.