Aug 25, 2018

[HDGEM] How to determine the file size of a MySQL table

To determine the file size of a table

Use the following SQL command to determine if any of your tables are too large and are candidates for partitioning. To update table statistics, issue an ANALYZE TABLE command on each table. For more information, see ANALYZE TABLE in the MySQL documentation.
SELECT TABLE_SCHEMA, TABLE_NAME,       round(((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024), 2) As "Approximate size (MB)", DATA_FREE       FROM information_schema.TABLES      WHERE TABLE_SCHEMA NOT IN ('mysql', 'information_schema', 'performance_schema'); 

Posted By Blogger to HDGEM at 11/02/2016 07:13:00 AM