并发链接数

链接数查询

 show variables like '%max_connections%'; 
 show global status like 'Max_used_connections'; 
 
查询客户端连接ip
select SUBSTRING_INDEX(host,':',1) as ip , count(*) from information_schema.processlist group by ip;
 
 

select b.encode "用户编号",b.realname "姓名",a.operatevalue "操作金额",a.operateovervalue "操作后金额"
, date_format(a.createdate, "%Y-%m-%d %H:%i:%s") "创建时间" ,a.description "描述"
from tysc_usercommodityaccountsdetail a
LEFT JOIN expand_user b
on a.userid=b.userid
where
a.rewardType=1
and a.CreateDate>= '2018-11-01 00:00:00'
and a.CreateDate<='2018-11-01 23:59:59'
-- order by a.createdate asc

 

--修改innodb引擎索引

alter table tysc_usercommodityaccountsdetail engine=innodb;

 索引锁片查询

select table_name,engine,table_rows,data_length+index_length length,DATA_FREE from information_schema.tables where data_free !=0;

posted on 2018-03-14 15:48  王德冲  阅读(120)  评论(0编辑  收藏  举报

导航