26 February 2019
26 February 2019

What are Inline Indexes?

New releases of SQL Server arrive at a quick pace, and it's difficult to keep up with the many features introduced in each version. In this article, Phil Factor reviews a feature you may have missed, inline indexes. He covers the syntax and the many ways they can be used and then performs some performance tests to see if they can make a difference with table variables.… Read more
10 April 2018
10 April 2018

Execution Plans and Data Protection

One of the most important tools for query tuning is the ability to view execution plans. They are even portable; you can send an execution plan to get advice from someone who doesn't have access to the underlying data. Have you even considered that sensitive information might travel along with the plans? Hugo Kornelis explains how execution plans affect data protection. … Read more
06 June 2017
06 June 2017

Query Store and Parameterization Problems

The query store gives us a novel way of identifying those queries that are causing performance problems when they are parameterized by SQL Server for reuse. Although it is relatively simple to ensure that certain troublesome queries avoid the problem, it is laborious to identify these queries. Additionally, Query Store gives us the means to fix the problem for groups of queries by means of plan guides without changing the DDL at all. Dennes Torres explains the details… Read more
22 July 2016
22 July 2016

SQL Server Statistics Basics

Distribution statistics are used by SQL Server's Query Optimiser to determine a good execution plan for your SQL query. You don't need to know about them to execute queries, but the better you understand them, the better you can optimise your queries and sort out performance problems. Robert Sheldon once more provides a simple guide.… Read more
16 March 2016
16 March 2016

T-SQL Window Function Speed Phreakery: The FIFO Stock Inventory Problem

Sometimes, in the quest for raw SQL performance, you are forced to sacrifice legibility and maintainability of your code, unless you then document your code lavishly. Phil Factor's SQL Speed Phreak challenge produced some memorable code, but can SQL features introduced since then help to produce code that performs as well and is also easy to understand? Aunty Kathi investigates.… Read more
07 September 2015
07 September 2015

How to Avoid Conditional JOINs in T-SQL

Relational databases go out of their way to execute SQL, however bad the crimes against Codd and relational theory within the query. The 'conditional join', can be executed but at great cost. As always, it is much better to sit back and restate the problem in a set-based way. The results can be rewarding.… Read more