-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshow_all_myisam.sql
27 lines (26 loc) · 1.17 KB
/
show_all_myisam.sql
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
SELECT Concat('ALTER TABLE ', table_schema, '.', table_name, ' engine=INNODB;')
AS
'===== MyISAM Tables without FULLTEXT indexes ====='
FROM information_schema.tables
WHERE engine = 'MyISAM'
AND table_schema <> 'mysql'
AND table_schema <> 'information_schema'
AND Concat(table_schema, '.', table_name) NOT IN
(SELECT
Concat(table_schema, '.', table_name)
FROM
information_schema.statistics
WHERE
index_type = 'fulltext');
SELECT Concat(table_schema, '.', table_name) AS
'===== MyISAM Tables with FULLTEXT indexes ====='
FROM information_schema.tables
WHERE engine = 'MyISAM'
AND table_schema <> 'mysql'
AND table_schema <> 'information_schema'
AND Concat(table_schema, '.', table_name) IN (SELECT
Concat(table_schema, '.', table_name)
FROM
information_schema.statistics
WHERE
index_type = 'fulltext');