码迷,mamicode.com
首页 > 数据库 > 详细

检查mysiam表SQL

时间:2020-07-17 14:16:16      阅读:60      评论:0      收藏:0      [点我收藏+]

标签:ODB   sele   data   rman   not   ota   free   检查   from   

接管一套陌生的数据库一定要检查一下业务数据库是否存在mysiam存储引擎,默认情况下,我们是不允许使用mysiam存储引擎的。

SELECT 
TABLE_SCHEMA AS database_name,
TABLE_NAME AS table_name,
TABLE_ROWS AS table_rows,
ENGINE AS table_engine,
ROUND((DATA_LENGTH)/1024.0/1024, 2) AS Data_MB,
ROUND((INDEX_LENGTH)/1024.0/1024, 2) AS Index_MB,
ROUND((DATA_LENGTH+INDEX_LENGTH)/1024.0/1024, 2) AS Total_MB,
ROUND((DATA_FREE)/1024.0/1024, 2) AS Free_MB
FROM information_schema.`TABLES` AS T1
WHERE T1.`TABLE_SCHEMA` NOT IN(‘performance_schema‘,‘mysql‘,‘information_schema‘,‘sys‘)
AND T1.`ENGINE` NOT IN (‘innodb‘);

检查mysiam表SQL

标签:ODB   sele   data   rman   not   ota   free   检查   from   

原文地址:https://blog.51cto.com/roidba/2511301

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!