no_merge/merge vs no_unnest/unnest
2016-04-09 15:49
337 查看
I sometimes get confused about the difference between (no_)merge and(no_)unnest.
I just do some test here to make the difference clearly.
The original sql and its plan are below. I’ll hint the sql with no_merge andno_unnest.
You will find the difference quickly.
I try the hint no_merge in
order to avoid merging the subquery. This obviously don’t work.
Then I try the hint no_unnest.
It works now. That means (no_)unest works
only in the where clause. So I guess (no_)merge is
only suitable after the from.
I do another test with the original sql below:
you will see the no_unest hint
doesn’t work.
Now I hint the original sql with the hint no_merge.
It works. That’s it!
I just do some test here to make the difference clearly.
The original sql and its plan are below. I’ll hint the sql with no_merge andno_unnest.
You will find the difference quickly.
order to avoid merging the subquery. This obviously don’t work.
19 |
It works now. That means (no_)unest works
only in the where clause. So I guess (no_)merge is
only suitable after the from.
doesn’t work.
It works. That’s it!
相关文章推荐
- SQLServer中merge函数用法详解
- SQL中Merge用法详解
- MySQLMerge存储引擎
- Android中使用include标签和merge标签重复使用布局
- MySQLMerge存储引擎
- Oracle中merge into的使用
- Oracle中merge into的使用
- oracle merge into用法
- oracle中merge的用法
- svn-merge命令摘录
- postgres 模拟merge 插入或者对已存在进行更新
- 数字转化为人民币大写
- 使用svn merge实现回退版本
- 各种排序算法java实现,好文,做个备份
- git 小型团队项目git管理
- aaaaaaaaaaaaaaa
- 排序算法总结
- 打包msde
- 使用svn开发,目录的约定与开发流程
- 全排列算法的递归与非递归实现