{"id":459,"date":"2017-02-19T14:43:54","date_gmt":"2017-02-19T14:43:54","guid":{"rendered":"https:\/\/chemicloud.com\/kb\/?post_type=article&#038;p=459"},"modified":"2020-03-25T14:42:26","modified_gmt":"2020-03-25T14:42:26","slug":"determine-size-databases-tables-phpmyadmin","status":"publish","type":"ht_kb","link":"https:\/\/chemicloud.com\/kb\/article\/determine-size-databases-tables-phpmyadmin\/","title":{"rendered":"How to determine the size of MySQL databases and tables in phpMyAdmin"},"content":{"rendered":"<p>In this guide, we will show you how to find the size of MySQL databases and tables. You can use the phpMyAdmin web interface to determine the sizes of MySQL databases and tables.<\/p>\n<h3 id=\"how-to-determine-the-size-of-mysql-databases-and-tables-in-phpmyadmin\">How to determine the size of MySQL databases and tables in phpMyadmin<\/h3>\n<p>To do this, follow these steps:<\/p>\n<p>This tutorial assumes that you&#8217;re already <a href=\"https:\/\/chemicloud.com\/kb\/article\/how-to-login-cpanel-whm\/\" target=\"_blank\" rel=\"noopener noreferrer\">logged into cPanel<\/a>.<\/p>\n<p>In the <em><strong>Databases<\/strong><\/em> section of the cPanel home screen, click <strong><em>phpMyAdmin<\/em><\/strong>. The phpMyAdmin administration page appears in a new window.<\/p>\n<p>In the left pane, click the name of the database that you want to view.<\/p>\n<p>In the right pane, locate the <em><strong>Size<\/strong><\/em> column. phpMyAdmin displays the size of each table in the database:<\/p>\n<p><a href=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2017\/02\/Database-Size.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1153\" src=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2017\/02\/Database-Size-1024x600.png\" alt=\"Database Size\" width=\"840\" height=\"492\" \/><\/a><\/p>\n<p>To obtain the <strong>total size of the database<\/strong>, scroll down to the end of the Size column.<\/p>\n<p>If the database contains a large number of tables, you may need to click the <strong>&gt;<\/strong> icon to advance to the next page of tables.<\/p>\n<p>Add together the size totals on each page to obtain the total database size.<\/p>\n<h3 id=\"how-to-list-all-table-sizes-from-all-databases\">How to list all table sizes from all databases<\/h3>\n<p>If you\u2019re running into an issue where your database size is growing, but you don\u2019t know which table is the culprit, it may be useful to query for the size of all tables within all existing databases.<\/p>\n<p>In <strong>phpMydmin<\/strong>, locate the &#8216;<em><strong>SQL<\/strong><\/em>&#8216; tab, then execute the following query:<\/p>\n<pre> SELECT\r\nTABLE_SCHEMA AS `Database`,\r\nTABLE_NAME AS `Table`,\r\nROUND((DATA_LENGTH + INDEX_LENGTH) \/ 1024 \/ 1024) AS `Size (MB)`\r\nFROM\r\ninformation_schema.TABLES\r\nORDER BY\r\n(DATA_LENGTH + INDEX_LENGTH)\r\nDESC;<\/pre>\n<p>Click on <strong>Go<\/strong> button.<\/p>\n<p>Depending on how many databases you have and how large they are, this command may take a minute or two to complete.<\/p>\n<p>After the command finishes,\u00a0it will return not only the size of the tables but also the table name and parent database it is associated.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we will show you how to find the size of MySQL databases and tables. You can use the phpMyAdmin web interface to determine the sizes of MySQL databases and tables. How to determine the size of MySQL databases and tables in phpMyadmin To do this, follow these&#8230;<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"ht-kb-category":[34],"ht-kb-tag":[],"class_list":["post-459","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-troubleshooting"],"_links":{"self":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/comments?post=459"}],"version-history":[{"count":3,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/459\/revisions"}],"predecessor-version":[{"id":2117,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/459\/revisions\/2117"}],"wp:attachment":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/media?parent=459"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=459"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}