除非确实需要服务器消除重复的行,否则一定要使用union all,因为没有all关键字,MySQL会在查询的时候给临时表加上distinct的关键字,这个操作的代价很高。
MySQL优化union查询
猜你喜欢
转载自blog.csdn.net/a772304419/article/details/103905975
今日推荐
周排行