首页 > 数据库 >SQL Server – 执行计划和各种 join 方式 (Execution plan & Join Pattern)

SQL Server – 执行计划和各种 join 方式 (Execution plan & Join Pattern)

时间:2023-03-31 12:57:01浏览次数:35  
标签:join Pattern Step plan query Execution Plan

What, When, Why?

什么是 Execution Plan?

Execution plan 里头包含了 query 执行时的各做 information, 比如 IO 速度, 查找了多少 rows 等等

为什么要看 Execution Plan?

当 query 慢的时候, 可以通过分析 execution plan, 知道它为什么慢, 然后做优化.

怎样优化?

优化的方法有很多, 但绝大部分的情况加 index (索引) 就可以了.

总结

当我们发现 query 慢的时候就查看 execution plan, 然后添加 index, 通常它就快了.

 

Step by Step

 

标签:join,Pattern,Step,plan,query,Execution,Plan
From: https://www.cnblogs.com/keatkeat/p/17275918.html

相关文章