随笔 - 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 会话 不可
阅读全文
profiling分析
摘要:mysql默认关闭 mysql> show variables like '%profiling%'; mysql> show variables like '%profiling%'; + + + | Variable_name | Value | + + + | have_profiling |
阅读全文
mysql慢查询
摘要:mysql慢查询日志默认是关闭的 mysql> show variables like '%slow_query_log%'; + + + | Variable_name | Value | + + + | slow_query_log | OFF | | slow_query_log_file |
阅读全文
sql语句中in与exists的使用区别
摘要:select ... from table where exists (subquery) 含义: 将主查询的数据放到子查询中做验证,根据验证结果(true or false) 来决定主查询结果集.
阅读全文