官术网_书友最值得收藏!

Understanding Query Processing

Now that we have learned the basics of writing T-SQL queries and how SQL Server interprets them, the next logical step is to understand how SQL Server processes and ultimately executes the query. The Query Processor includes query compilation, query optimization, and query execution essentials; how does SQL Server compile an incoming T-SQL statement? How does SQL Server optimize and execute a T-SQL statement? How does SQL Server use parameters? Are parameters an advantage? Why does a SQL Server cache execution plans for certain T-SQL statements but not others? When is that an advantage and when is it a problem? This is information that any T-SQL practitioner needs to keep as reference for proactive T-SQL query writing, as well as reactive troubleshooting and optimization purposes. This chapter will be referenced throughout all  chapters, as we bridge architectural topics to real-world usage. The main stages of query processing can be seen in the following overview diagram, which we will expand on throughout this chapter:

In this chapter we will cover the following topics:

  • Query compilation essentials
  • Query optimization essentials
  • Query execution essentials
  • Plan caching and reuse
  • The importance of parameters
主站蜘蛛池模板: 望都县| 卫辉市| 斗六市| 望奎县| 九龙坡区| 沾化县| 武冈市| 甘泉县| 长寿区| 南涧| 墨江| 武川县| 金乡县| 晋中市| 灌南县| 合江县| 错那县| 军事| 新疆| 富宁县| 弋阳县| 桂东县| 铜鼓县| 合阳县| 易门县| 奉化市| 娄烦县| 蓬安县| 花莲县| 遂溪县| 锡林郭勒盟| 东乌珠穆沁旗| 福清市| 南和县| 微山县| 米易县| 博爱县| 策勒县| 杭锦旗| 榆中县| 庄浪县|