How much space would empty MyISAM table take ? Probably 8K for .frm file, 1KB for .MYI file and 0 for MYD file. .MYI file can be larger if you have many indexes.
How much space will Innodb take:
PLAIN TEXT SQL:
- mysql> CREATE TABLE test_innodb(a int, b int) engine=innodb;
- Query OK, 0 rows affected (0.30 sec)
Check out files (using Innodb File Per Table)
-rw-rw---- 1 mysql mysql 8578 Dec 16 20:33 test_innodb.frm
-rw-rw---- 1 mysql mysql 98304 Dec 16 20:33 test_innodb.ibd
So we get about 100K and so about 10 times more for MyISAM. This is ignored space which needs to be allocated in main tablespace for Innodb data dictionary. But that one is pretty small.
This is the good reason to avoid having very small Innodb tables - they will …
[Read more]