sql 2005 强制使用执行计划 T—SQl
来源:互联网 发布:家用彩色打印机 知乎 编辑:程序博客网 时间:2024/06/11 07:20
select * from tt t inner loop join ss s with(nolock) on s.c=t.c
使用 nested join
select * from tt t inner merge join ss s with(nolock) on s.c=t.c
使用 merge join
select * from tt t inner hash join ss s with(nolock) on s.c=t.c
使用 hash jion
nolock 不允许锁
Microsoft SQL Server sometimes uses hash and merge joins when querying large tables when uncomplicated nested loop joins would result in better performance and less server impact. In many such cases, query times go from many milliseconds to many seconds because hash table joins require that large amounts of data be processed and temporarily stored, and merge joins require sorting and then processing similarly large amounts of data.
This is fine for one-time administrative "fact finding" queries where you don't have or want the indices needed to optimize the query, and you're willing to wait the seconds or minutes it takes to get results.
For day-in-and-day-out application queries, however, you don't want your database engine to be hashing or sorting hundreds of thousands or millions of rows, especially when the end result is only a small number of rows.
- sql 2005 强制使用执行计划 T—SQl
- 使用outline稳固sql执行计划
- 使用plsql执行计划进行sql调优
- SQL执行计划、绑定变量的使用
- 使用spm固定sql执行计划
- 写SQL要学会使用"执行计划"
- 使用plsql执行计划进行sql调优
- 使用trace跟踪sql语句执行计划
- 使用plsql执行计划进行sql调优
- 使用outline固定sql执行计划
- 使用oracle sql profile固定执行计划
- 写SQL要学会使用"执行计划"
- 使用plsql执行计划进行sql调优
- sql 执行计划
- SQL执行计划分析
- DB2 SQL执行计划
- SQL执行计划分析
- hive sql执行计划
- COM编程入门
- 使用perl 把某个文件移动到其他的文件夹目录下。
- 反射机制
- 0001 jsp中使用javabean的两点注意事项
- C/C++指针和数组的使用和区别
- sql 2005 强制使用执行计划 T—SQl
- C++编译器如何实现异常处理
- JAVA面试题解惑系列(八)——聊聊基本类型(内置类型)
- 编写守护进程
- Job进度条学习
- 链表的逆置
- C# Socket编程
- Ruby实践—连接Mysql
- 嵌入式编译器常用输出格式--Hex-80(Hex 386)