Difference between revisions of "Maria DB: show tables;"
Jump to navigation
Jump to search
(28 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[MariaDB]] | + | |
− | * <code>[[show tables (example)]]</code> | + | MariaDB [(none)]> show tables; |
− | * <code>show table status like '%';</code> | + | ERROR 1046 (3D000): [[No database selected]] |
+ | |||
+ | == [[MariaDB]] == | ||
+ | * <code>[[show tables (example)|show tables]]</code> | ||
+ | * <code>[[show table status]]</code> | ||
+ | * <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 === | ||
+ | |||
+ | [[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 | |
− | |||
+ | == Related terms == | ||
+ | * <code>[[create table]]</code> | ||
+ | * <code>[[create database]]</code> | ||
+ | * [[Databases: list tables]] | ||
+ | * [[List databases]] | ||
== See also == | == See also == | ||
+ | * {{SQL}} | ||
* {{MariaDB}} | * {{MariaDB}} | ||
− | |||
− | |||
[[Category:MariaDB]] | [[Category:MariaDB]] |
Latest revision as of 10:13, 16 December 2022
MariaDB [(none)]> show tables; ERROR 1046 (3D000): No database selected
MariaDB[edit]
show tables
show table status
show table status like '%';
(Includes engine type)show table status where name = "YOUR_TABLE_NAME"
(Includes engine type)
Size of MariaDB tables[edit]
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
Related terms[edit]
See also[edit]
- SQL, NewSQL, RDMS: GraphQL (2015), SQLite,
select, insert
,select count
, Distributed SQL, TablePlus, Cache hit ratio,pg_stat_user_tables
,EXPLAIN
, Index (PostgreSQL), DDL, SQL/MED, Group by, List users, SQL Injection, SQLAlchemy,CREATE USER, CREATE ROLE, EXPLAIN, ALTER DATABASE, REVOKE, NOLOCK, NOWAIT, EXISTS
, Unique constraint - MariaDB:
mariadbcheck
,mariabackup
,mysqldump
, MyRocks,show (MariaDB)
MariaDB Changelog,50-server.cnf
, MariaDB engines, .ibd, .myd, .myi,/var/log/mysql/error.log
, MariaDB files:.frm
,.ibd
,/etc/mysql/mariadb.conf.d/50-server.cnf
, replication, MariaDB slow queries,show databases;
, Aria, MyISAM, MariaDB SkySQL, binary log, 3306
Advertising: