blob: 0639e4008a11960f06c46d425ed430645c76a797 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# Clean Up
## Tags
* assigned: pjotrp, robw
* status: unclear
* priority: unclear
* type: database administration
* keywords: database, mariadb
## Description
Find all larger tables
```
SELECT TABLE_SCHEMA,TABLE_NAME,DATA_LENGTH FROM information_schema.TABLES WHERE DATA_LENGTH>10000;
```
The following four 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 |
+--------------+----------------------+-------------+
| db_webqtl | TraitMetadata | 16384 |
| db_webqtl | ProbeSetSE | 24177016832 |
| db_webqtl | metadata_audit | 49152 |
| db_webqtl | mytest1 | 1567621120 |
| db_webqtl | ProbeSetXRef | 2836398080 |
| db_webqtl | GeneInfo | 23642112 |
| db_webqtl | mytest2 | 56524537856 |
| mysql | transaction_registry | 16384 |
| mysql | innodb_index_stats | 16384 |
| mysql | innodb_table_stats | 16384 |
| 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
```
|