Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm in the process of importing a couple of SQL dumps into my own mySQL server. The size of these dumps, from Wikipedia, are 2.3 GB and 22 GB. Is the size of an SQL dump file approximately the same as its size on the mySQL server, once imported? Thanks

share|improve this question

1 Answer 1

up vote 7 down vote accepted

This would depend entirely on the data being stored, and what indexes are used.

For example, all data is stored as text in the dump file, whereas things like numbers and dates would be stored as binary information. So a 20 digit integer would take 20 bytes of storage in the dump file (plus formatting and delimeters), whereas it could be stored in an 8 byte binary field.

Also if you are using fixed length fields (and the storage format is fixed length) then fields in the dump file that are shorter than the column they are destined for will use up more room in the database than in the text file.

Any indexes you have can dramatically increase the amount of on-disk storage you might need.

Innodb and myisam (common mysql storage formats) have different overheads too.

So it is difficult to predict what the relationship between the dump file size is and the on-disk size once imported.

share|improve this answer

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.