Is there a quick way to determine how much disk space a particular MySQL table is taking up? The table may be MyISAM or Innodb.
Is there a quick way to determine how much disk space a particular MySQL table is taking up? The table may be MyISAM or Innodb.
Most answers above are inaccurate for InnoDB tables. You can replicate this easily.
Add 10,000 dummy records to a table, and run the above suggested queries. Then delete all 10,000 records using delete command (not truncate).
Run above suggested queries again, you will see the size is not 0.
Files on disk only grow but dont shrink even when data is deleted. If you want to shrink, you need to truncate or run something such as OPTIMIZE TABLE.
There seems no reliable way to know how much space InnoDB table records are really consuming. Even if file on disk says 100MB, actual records in DB could be 0.