- 博客(2)
- 收藏
- 关注
原创 mysql幻读的理解
先看下mysql官网的解释 The so-called phantom problem occurs within a transaction when the same query produces different sets of rows at different times. For example, if a SELECT is executed twice, but returns a row the second time that was not returned the first ti
2021-01-14 11:50:13
268
原创 mysql优化之in内子查询
遇到的问题 执行下面的语句: select f.id,f.name from father f where id in(select max(id) from father group by name); 前提 id为primary键 name为单列索引 情况 先执行子查询,走索引 再执行外查询,但是外部查询没有走索引,进行了全表扫描 解决方法有 group_concat()构造逗号分隔字符串,但是有1024字节限制 exists 如果左边为大表,还是会全文搜大表 join 具体分析
2021-01-14 10:50:46
355
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅