Articles tagged sql monitor

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
14 August 2015
14 August 2015

Basic SQL Server Performance Troubleshooting For Developers

The speed of a slow SQL Query can almost always be improved. In SQL Server, the query optimizer determines the best way of executing the query, based on the evidence it has. The same query can be executed in many different ways as the data size increases, new indexes become available, or as the data distribution changes. If the appropriate index doesn't exist or can't be used, then SQL Server shrugs and does the best it can. Tony Davis explains how to find out what a query needs to perform w… Read more
18 March 2015
18 March 2015

Never Ignore a Sort Warning in SQL Server

It is always bad news if your SQL queries are having to use the SORT operator. It is worse news if you get a warning that sort operations are spilling onto TempDB. If you have a busy, slow TempDB, then the effect on performance can be awful. You should check your query plans to try to eliminate SORTs and never leave a SORT warning unheeded. Fabiano Amorim shows the range of ways of getting information on what is going on with a query that is doing a SORT and when requests are made for memory.… Read more