summaryrefslogtreecommitdiff
path: root/topics/systems/mariadb
diff options
context:
space:
mode:
Diffstat (limited to 'topics/systems/mariadb')
-rw-r--r--topics/systems/mariadb/cleanup.gmi6
1 files changed, 6 insertions, 0 deletions
diff --git a/topics/systems/mariadb/cleanup.gmi b/topics/systems/mariadb/cleanup.gmi
index 73085da..2222654 100644
--- a/topics/systems/mariadb/cleanup.gmi
+++ b/topics/systems/mariadb/cleanup.gmi
@@ -2,10 +2,13 @@
Find all larger tables
+```
SELECT TABLE_SCHEMA,TABLE_NAME,DATA_LENGTH FROM information_schema.TABLES WHERE DATA_LENGTH>10000;
+```
The following 4 mysql tables live in
+```
MariaDB [mysql]> SELECT TABLE_SCHEMA,TABLE_NAME,DATA_LENGTH FROM information_schema.TABLES WHERE ENGINE = 'InnoDB';
+--------------+----------------------+-------------+
| TABLE_SCHEMA | TABLE_NAME | DATA_LENGTH |
@@ -23,5 +26,8 @@ MariaDB [mysql]> SELECT TABLE_SCHEMA,TABLE_NAME,DATA_LENGTH FROM information_sch
| mysql | gtid_slave_pos | 16384 |
+--------------+----------------------+-------------+
11 rows in set (0.008 sec)
+```
+```sh
for x in innodb_index_stats innodb_table_stats gtid_slave_pos transaction_registry ; do echo $x ; mysqldump -u webqtlout -pwebqtlout mysql $x > /export3/$x.sql ; done
+```