Skip to content

Instantly share code, notes, and snippets.

@kalv
Created June 19, 2009 11:18
Show Gist options
  • Save kalv/132560 to your computer and use it in GitHub Desktop.
Save kalv/132560 to your computer and use it in GitHub Desktop.
mysql> SELECT concat(table_schema,'.',table_name),concat(round(table_rows/1000000,2),'M') rows,concat(round(data_length/(1024*1024*1024),2),'G') DATA,concat(round(index_length/(1024*1024*1024),2),'G') idx,concat(round((data_length+index_length)/(1024*1024*1024),2),'G') total_size,round(index_length/data_length,2) idxfrac FROM information_schema.TABLES ORDER BY data_length+index_length DESC LIMIT 10;
+-------------------------------------------+--------+-------+-------+------------+---------+
| concat(table_schema,'.',table_name) | rows | DATA | idx | total_size | idxfrac |
+-------------------------------------------+--------+-------+-------+------------+---------+
| aspire_production.form_answers | 28.23M | 2.97G | 1.81G | 4.78G | 0.61 |
| aspire_production.sessions | 7.52M | 1.25G | 0.53G | 1.78G | 0.42 |
| aspire_production.searches | 1.87M | 0.71G | 0.32G | 1.02G | 0.44 |
| aspire_production.aggregate_vacancy_stats | 2.80M | 0.23G | 0.68G | 0.91G | 3.00 |
| aspire_production.form_prefill_answers | 8.81M | 0.35G | 0.33G | 0.68G | 0.95 |
| aspire_production.vacancy_activity | 4.54M | 0.21G | 0.37G | 0.58G | 1.79 |
| aspire_production.vacancy_criteria | 2.52M | 0.15G | 0.24G | 0.39G | 1.56 |
| aspire_production.audits | 1.20M | 0.14G | 0.07G | 0.21G | 0.49 |
| aspire_production.vacancies | 0.07M | 0.13G | 0.02G | 0.15G | 0.15 |
| aspire_production.uploaded_file_activity | 2.27M | 0.11G | 0.03G | 0.13G | 0.27 |
+-------------------------------------------+--------+-------+-------+------------+---------+
10 rows in set (1.97 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment