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

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 17: Line 17:
  
 
Ref: https://stackoverflow.com/questions/9620198/how-to-get-the-sizes-of-the-tables-of-a-mysql-database
 
Ref: https://stackoverflow.com/questions/9620198/how-to-get-the-sizes-of-the-tables-of-a-mysql-database
 
  
 
== [[MongoDB]] ==
 
== [[MongoDB]] ==
 
* <code>[[show tables]]</code>
 
* <code>[[show tables]]</code>
 +
 +
== Related terms ==
 +
* <code>[[create table]]</code>
 +
 +
  
 
== See also ==
 
== See also ==

Revision as of 07:32, 9 September 2021

MariaDB

Size of MariaDB tables:

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;

Ref: https://stackoverflow.com/questions/9620198/how-to-get-the-sizes-of-the-tables-of-a-mysql-database

MongoDB

Related terms


See also

Advertising: