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

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
主站蜘蛛池模板: 阜城县| 广汉市| 中宁县| 湘阴县| 贵德县| 九龙城区| 海南省| 腾冲县| 抚松县| 嘉鱼县| 湖州市| 昆明市| 西乌珠穆沁旗| 铁力市| 黔江区| 什邡市| 寿宁县| 民乐县| 新泰市| 金川县| 临汾市| 汶上县| 高安市| 乐至县| 古蔺县| 邓州市| 化德县| 盈江县| 舒城县| 巴东县| 马山县| 阳信县| 元阳县| 广宁县| 铜川市| 苍梧县| 明溪县| 安图县| 永嘉县| 河北区| 望都县|