posted 2 years ago
There are all sorts of reasons.
Unlike disk files, which generally have realtively fixed storage requirements, databases use storage in more complex and less predictable ways. MySQL in fact, is a generic engine that can drive several different storage backends, historically innodb, ISAM, various other forms and even CSV! So a very important effector of disk space needs is which backend your tables are stored in.
Databases are also designed to deal with large amounts of field-structured data and often with repetitive field values. That means that a backend can get really creative with how it packs information interrnally. Consider Morse Code. The most common letter values (E, T, A, N) are very short. Less common letter values (Y, Q) take more space. ZIP compression utilities do this also, but in their case, they dynamically determine what's most common in a given set of data.
Migrating data can therefore bring a number of effects. First, you might be using a different backend. Secondly. the order in which the data was loaded might impact storage-balancing algorithms. Third, there might be different tuning options set on in the new server.
If space is really critical, consult the MySQL storage tuning literature. For most of us, disk is cheap and tuning expertise is expensive.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer