mysql语法存在哪些查询方法,下面web建站小编给大家详细介绍一下各种查询方法!
查看库的大小,剩余空间的大小
select table_schema,round((sum(data_length / 1024 / 1024) + sum(index_length / 1024 / 1024)),2)
dbsize,round(sum(DATA_FREE / 1024 / 1024),2) freesize,
round((sum(data_length / 1024 / 1024) + sum(index_length / 1024 / 1024) +
sum(DATA_FREE / 1024 / 1024)),2) spsize from information_schema.tables
where table_schema not in ('mysql','information_schema','performance_schema')
group by table_schema order by freesize desc;
查询正在运行中的事务
select p.id,p.user,p.host,p.db,p.command,p.time,i.trx_state,i.trx_started,p.info from information_schema.processlist p,information_schema.innodb_trx i where p.id=i.trx_mysql_thread_id;
查看库中所有表的大小
select table_name,concat(round(sum(DATA_LENGTH/1024/1024),2),'M') from information_schema.tables where table_schema='t1' group by table_name;
查看库中有索引的表
select TABLE_SCHEMA,TABLE_NAME,group_concat(INDEX_NAME) from information_schema.STATISTICS where
TABLE_SCHEMA not in ('sys','mysql','information_schema','performance_schema')
group by TABLE_NAME ;
查看库中没有索引的表
select TABLE_SCHEMA,TABLE_NAME from information_schema.tables
where TABLE_NAME not in (select distinct(any_value(TABLE_NAME))
from information_schema.STATISTICS group by INDEX_NAME)
and TABLE_SCHEMA not in ('sys','mysql','information_schema','performance_schema');
上面是“mysql语法中有哪些查询方法”的全面内容,想了解更多关于 mysql 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_3609.html
workflows工作流
一个骷髅海盗船长ComfyUI工作流
大黄蜂空中决战ComfyUI工作流
树上挂着一只快乐的荔枝ComfyUI工作流
蝴蝶兰comfyui工作流
一个超凡脱俗的女明星的特写镜头ComfyUI工作流
一只巨大的古代乌龟后面建有一座城市的超现实场景
一匹热血沸腾的汗血宝马庄严地站立着ComfyUI工作流
荷塘月色ComfyUI工作流
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

利用html5+css3实现滚雪球效果(附代码)
js+css3做一个灯泡开灯关灯效果
制作一个好玩的倒计时
利用canvas画几个好玩的星云物种
利用js做一个炫酷音乐背景效果
会议人员60s签到倒计时插件
如何利用css3+js做一个下雨效果
jquery鼠标滑过图片边框特效(jquery.focus-follow插件)












