- 博客(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 177
原创 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 262
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人