Workshop: Performance and Query Tuning with SQL Server 2017 and 2019

As part of the SQL Saturday Linz conference, I will have a performance tuning workshop on 17th January in Tabakfabrik in Linz. The full workshop name is Performance and Query Tuning with SQL Server 2017 and 2019. As the name suggests, the workshop covers performance tuning techniques specific for two recent SQL Server versions. It […]

Speaking at the BLBit user group and SQL Saturday conference in Banja Luka

Last week, we had a great time in Banja Luka. On 1st November, together with my friend and fellow Data Platform MVP and book author Dejan Sarka I talked about common database design mistakes made by application and database developers. It was really pleasure to deliver the session in that audience – more than 70 […]

I am speaking at Microsoft Sinergija 18 Conference Belgrade

I’m very glad that I will present again at Microsoft Sinergija 18 conference in Belgrade on October 25th 2018. Microsoft Sinergija 18 will be held from October 24 through 26 at the Crowne Plaza hotel in Belgrade under the slogan “Digital breakthrough”. This time, my topic is related to cardinality estimation issues, and I will […]

Table Variable Deferred Compilation in SQL Server 2019 CTP2- Undocumented Options

At the time of writing and publishing the series of articles about the Table Variable Deferred Compilation feature in SQL Server 2019 CTP2, I did not know about undocumented options and hints related to it, but in the meantime, thanks to Dmitry Pilugin (blog | twitter), I learned how you can play with table variables […]

The Good, the Bad and the Ugly of Table Variable Deferred Compilation – Part 3

In the final article in this series, you will see how new behavior of table variables in SQL Server 2019 CTP2 called Table Variable Deferred Compilation can break existing performance workarounds. As mentioned in the earlier posts, table variables had fixed cardinality of 1 for more than 18 years. This property caused some bad execution […]

The Good, the Bad and the Ugly of Table Variable Deferred Compilation – Part 2

In two previous articles, you saw how new behavior of table variables in SQL Server 2019 can improve execution plans. This article demonstrates another aspect of this behavior, which is by design neither good, nor bad. Depending on data and execution context, it could end up as an improvement, but it can also degrade performance […]

The Good, the Bad and the Ugly of Table Variable Deferred Compilation – Part 1

As mentioned in the previous article, SQL Server 2019 cardinality estimations for a table variable are based on actual table variable row counts. Therefore, in SQL Server 2019, we should expect better estimations and better plans for queries that use table variables. Which queries will benefit from this improvement? Generally, queries that use table variables […]

Introduction to Table Variable Deferred Compilation

Prior to SQL Server 2019, cardinality of a table variable was hardcoded to 1, regardless of number of rows in it. The only way to see a different (and accurate) value there is to run a statement with the OPTION (RECOMPILE). Without this option, SQL Server assumes there will be only one row in a […]

Altering an Indexed Text Column

In this post, I am going to demonstrate how increasing the size of a text column with an index on it can lead to serious troubles without warning. I tested it two instances of SQL Server: SQL Server 2016 and 2017, but the same behavior should be expected with older versions; only the maximal allowed […]

Speaking at CI SQLPort Meeting in Lisbon

As always, I had a great time in Lisbon. I enjoyed this beatiful city and also visited Cascais and spent some time in the Atlantic ocean. But, Lisbon and Portugal are not only natural beauties, but also warm, openminded and cordial people. I meet again my friend Niko Neugebauer (blog | twitter) , an icreadible […]