Since we’re starting a new blog for the whole query processing team, we think it’s appropriate to start with an introductory post about query processing as a whole and what we’ll be talking about in this blog.
If you’re unfamiliar with the way SQL Server processes its queries, a good refresher can be found here. As mentioned in the linked article, the first operation that SQL Server performs when it encounters a query it has never seen before is to optimize it to produce an execution plan for it. Most of our older blog was focused on this stage of query processing, and we’ll still be talking about it a great deal. Some of the topics we’ll tackle in the query optimization space include:
Once armed with query plans, the SQL Server’s Query Execution (QE) component is primarily responsible for consuming these optimized query plans and transforming them into executable trees of physical operators. These physical operators are designed to implement a wide variety of algorithms for joins, sorts, aggregation, groupings, etc. By chaining these operators to conform with the query plan’s tree structure, QE is able to physically implement and execute the optimized query plan and perform the necessary computation to produce results for the end user.
In addition to the core operators, QE is also responsible for handling a number of server engine features, such as parallel query execution, distributed queries, and query memory management.
As a team, we are dedicated to providing a customer experience that is second to none. We strive to always maintain an exceptionally high level of robustness, performance, scalability, both within our component and for the rest of the query processor. By delivering powerful functionality through these execution building blocks, QE is critical in providing much of the flexibility needed for SQL Server to be an enterprise-quality database.
From a QE perspective, some of the interesting topics we plan to cover include:
Memory management policies in QE and how to interpret memory-related issues based on system loads
How to use information that can be collected from Showplan XML and Statistics Profile for execution analysis
Efficient use of Distributed Queries
Indexes and their role in Query Execution
Data Manipulation Language (DML) including wide plans, narrow plans, etc.
Parallel query execution - hints, tips, tricks, etc.
Execution plan caching - what is it and how does it help?