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

From wikieduonline
Jump to navigation Jump to search
Line 24: Line 24:
 
== [[PostgreSQL]] ==
 
== [[PostgreSQL]] ==
 
* <code>[[\dt]]</code>
 
* <code>[[\dt]]</code>
* <code>SELECT * FROM pg_catalog.[[pg_tables]];</code>
+
* <code>SELECT * FROM [[pg_catalog]].[[pg_tables]];</code>
  
 
== Related terms ==
 
== Related terms ==

Revision as of 12:47, 12 May 2022

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

  • show tables

Related: show collections

PostgreSQL

Related terms

See also

Advertising: