Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I want to make some approximation of table size for MySQL cluster.
Please read my reasoning and tell me, if I am right or am I making mistake somewhere.

I have simple table with PK (int) and additional column (int). In MySQL int = 4 bytes, so one row is about 12 bytes (4*2 for columns and 4 for PK index).
If I have for example 1'000'000 rows this will be 12'000'000 bytes ~= 11.5MB.
Am I right in this calculations? Can I store such table with so little space?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You will need some more space for row overhead and PK storage. More information you can find in MySQL Documentation.

For the most detailed information you can use ndb_size.pl utility.

share|improve this answer
    
How much do you mean, when you say "some more". 20%? 50%? 100%? –  Michał Herman Sep 24 '13 at 12:48
    
Use ndb_size.pl to get full information about space needed. It depends on MySQL Cluster version if additional column can be NULL, etc. –  Mindaugas Riauba Sep 24 '13 at 12:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.