Difference between revisions of "Maria DB: show tables;"

From wikieduonline
Jump to navigation Jump to search
Line 5: Line 5:
 
* <code>show table status like '%';</code> (Includes [[engine type]])
 
* <code>show table status like '%';</code> (Includes [[engine type]])
 
* <code>[[show table]] status where name = "YOUR_TABLE_NAME"</code> (Includes [[engine]] type)
 
* <code>[[show table]] status where name = "YOUR_TABLE_NAME"</code> (Includes [[engine]] type)
 +
 +
Size of MariaDB tables:
 +
<pre>
 +
SELECT
 +
    table_schema as `Database`,
 +
    table_name AS `Table`,
 +
    round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`
 +
FROM information_schema.TABLES
 +
ORDER BY (data_length + index_length) DESC;
 +
</pre>
 +
Ref: https://stackoverflow.com/questions/9620198/how-to-get-the-sizes-of-the-tables-of-a-mysql-database
  
  

Revision as of 12:41, 5 May 2021

Advertising: