outline: Objective to describe the approximate use of execution plans in SQL Server, which can be useful when a query performance bottleneck is encountered, and with a more detailed learning document and plan, which the reader can follow as I plan to achieve a more systematic study of the execution plan.
- What is SQL Server execution plan
- Approximate use of SQL Server execution plans
- Study Plan
1. What is SQL Server execution plan
- The execution plan is the result of the query optimizer's execution of the most efficient way to request a T-SQL query that we submit, and the execution plan tells us how the query is executed, and the execution plan is the most important way to troubleshoot database queries.
- The execution plan is presented in three ways, view type, text type, and XML type.
Approximate use of 2.sql server here is a small example
Check that you want to query the data, right-click the Display estimated execution plan, or use the shortcut key CTRL + L to see the execution plan immediately
Results:
Right-click on the query plan icon above you can see the details below, hit index, I/O consumption information, CPU consumption, query results line number, very intuitive can see the various parameters
3. Learning route
Learn the various icon meanings in the execution plan, icon learning Address: https://msdn.microsoft.com/zh-cn/library/ms191158 (v=sql.120). aspx
Plus some of the official Microsoft Learning Documents: https://msdn.microsoft.com/zh-cn/library/ms178071 (v=sql.105). aspx
Here are some of the more good things I think are written:
Http://www.cnblogs.com/biwork/archive/2013/04/11/3015655.html (Detailed introduction of the execution plan)
http://www.cnblogs.com/fish-li/archive/2011/06/06/2073626.html (Read SQL Server query plan)
http://www.cnblogs.com/kissdodog/p/3160560.html (Understanding of SQL Server Execution plan)
This is just a primer, and if there are interested people, you can read the link article carefully.
SQL Server execution planning (execution plan) Introduction