随笔 - 229  文章 - 0  评论 - 10  阅读 - 26万 
05 2020 档案
mysql锁
摘要:1. 查看表锁命令 In_use为0 ,表示没有锁表 2. 锁表 2.1 给表上读锁 2.2 给表上写锁 2.3 释放锁 3. 测试 3.1创建表tb_a. tb_b 3.2 添加数据 3.3 session1 给tb_a上读锁 session1 会话 可以读 tb_a session1 会话 不可 阅读全文
posted @ 2020-05-12 23:03 显示账号 阅读(256) 评论(0) 推荐(0) 编辑
profiling分析
摘要:mysql默认关闭 mysql> show variables like '%profiling%'; mysql> show variables like '%profiling%'; + + + | Variable_name | Value | + + + | have_profiling | 阅读全文
posted @ 2020-05-12 20:18 显示账号 阅读(267) 评论(0) 推荐(0) 编辑
mysql慢查询
摘要:mysql慢查询日志默认是关闭的 mysql> show variables like '%slow_query_log%'; + + + | Variable_name | Value | + + + | slow_query_log | OFF | | slow_query_log_file | 阅读全文
posted @ 2020-05-12 15:40 显示账号 阅读(168) 评论(0) 推荐(0) 编辑
sql语句中in与exists的使用区别
摘要:select ... from table where exists (subquery) 含义: 将主查询的数据放到子查询中做验证,根据验证结果(true or false) 来决定主查询结果集. 阅读全文
posted @ 2020-05-11 23:24 显示账号 阅读(146) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示