Revival of the Special Interest Group SQL Server Internals

Frank Geisler, Uwe Ricken and Torsten Strauß revive the SIG - SQL Server Internals Group after a long break. As before, we focus on the SQL Server Engine only, which has been expanded with several features in the SQL Server 2019 and thus certainly offers interesting topics. If you are interested in a certain topic, just send us an email or talk to Frank, Uwe or me directly.

By |2020-06-04T15:45:48+02:00June 4th, 2020|Microsoft SQL Server|0 Comments|Reading Time: 2 minutes

Design principles of the in-memory OLTP engine – Avoid CPU and memory overhead for interpreted T-SQL

In this blog, I explain why the in-memory OLTP engine is significantly faster than the traditional on-disk engine. T-SQL is interpreted code with high CPU and memory overhead when SQL Server has to compile the command before it can be executed by the engine. In-memory OLTP reduces the number of recompilations, which may lead to much faster query execution with less impact on CPU and memory.

By |2020-04-17T20:33:58+02:00April 6th, 2020|Microsoft SQL Server|0 Comments|Reading Time: 10 minutes

Design principles of the in-memory OLTP engine – Avoid physical reads

Microsoft introduced in-memory OLTP in SQL Server 2014, advertising that queries can be up to 100 times faster. In this blog series I will explain the design principles of the in-memory OLTP engine to explain why it has the potential to be significantly faster than the traditional on-disk engine by skipping the complexity of handling the data pages in the buffer pool and totally eliminates logical and physical reads which can result in much faster query execution and less CPU impact.

By |2020-04-17T20:41:24+02:00December 30th, 2019|Microsoft SQL Server|2 Comments|Reading Time: 8 minutes

The limitations of the missing index feature – It does not suggest filtered indexes

This will be my last blog about the limitations of the missing index feature. This time I will demonstrate that the missing index feature will not suggest filtered indexes. Filtered indexes reduce the index size and thus the storage allocation in the data file is reduced. Rebuilding or reorganizing these indexes also requires fewer resources. So it's worth creating filtered indexes when possible. The following example will prove that the missing index feature will not consider creating filtered indexes.

By |2020-04-17T20:41:55+02:00July 7th, 2019|Microsoft SQL Server|0 Comments|Reading Time: 6 minutes

The limitations of the missing index feature – It suggests creating indexes on imprecise and not persisted columns

This will be my penultimate blog about the limitations of the missing index feature and this one will be short. Before we start, let us clarify some terms so you can better understand the table we are going to create. The data types real and float are imprecise data types for use with floating point numeric data. Floating point data is approximate; therefore, not all values in the data type range can be represented exactly. Non deterministic columns are computed columns which may return different results each time they are called.

By |2020-04-17T20:42:28+02:00April 22nd, 2019|Microsoft SQL Server|0 Comments|Reading Time: 4 minutes

The limitations of the missing index feature – It reports only include columns for some queries

In the last post you saw that the missing index feature does not consider the order for columns to be used in an index. In this blog I will explain another limitation of the missing index feature - it reports only include columns for some queries. SQL Server supports two kind of row store indexes - the clustered index and then non-clustered index. It is important to understand the difference between these two indexes in order to implement the right index type to improve reading performance.

By |2020-04-17T20:43:03+02:00February 10th, 2019|Microsoft SQL Server|0 Comments|Reading Time: 5 minutes

The limitations of the missing index feature – It does not specify an order for columns to be used in an index

In the last post you saw that the missing index feature does not consider trivial plans. In this blog I will explain another limitation of the missing index feature - it does not specify an order for columns to be used in an index. SQL Server can only benefit from a row store index if the key columns are in the correct order. The order of the columns of an index determines whether SQL Server chooses an index scan or seek. Scanning an index simply means that the storage engine of SQL Server will read all index pages and filter the desired records afterwards (residual predicate)

By |2020-04-17T20:46:09+02:00December 31st, 2018|Microsoft SQL Server|4 Comments|Reading Time: 6 minutes

The limitations of the missing index feature – It does not consider trivial plans

In the last post you saw that the missing index feature does not gather statistics for more than 500 missing index groups. This time I am going to reveal another limitation which is not even documented - the missing index feature does not recommend missing indexes for trivial queries. SQL Server has to create an execution plan before executing a query because it has to evaluate the different available physical iterators depending on the cardinality estimation, supportive indexes, available hardware resources and instance settings to find a good enough plan.

By |2020-04-17T20:44:44+02:00October 12th, 2018|Microsoft SQL Server|0 Comments|Reading Time: 4 minutes

The limitations of the missing index feature – It cannot gather statistics for more than 500 missing index groups

Implementing the right indexes will improve the execution time and IO reads for a Select, Update or Delete. Unfortunately sometimes it is not that easy to identify missing indexes without having a deep understanding about Query Execution Plans. That is why SQL Server gives us a hint about missing indexes in an Execution Plan. Sounds beneficial but in this blog post I will proof that it is not always a good idea to rely on these index recommendations. According to Microsoft, there are the several Limitations for Using the Missing Indexes Feature.

By |2020-04-17T20:45:17+02:00October 6th, 2018|Microsoft SQL Server|0 Comments|Reading Time: 4 minutes