Query Optimization

Optimize Your SQL by Reformulating the Spec

  • Article

As SQL developers, we tend to think of performance tuning in terms of crafting the best table indices, avoiding scalar and table valued functions, and analyzing query plans (among other things). But sometimes going back to the spec and applying some properties of elementary math can be the best way to begin to improve performance of SQL queries which implement mathematical formulas. This article is a case study of how I used this technique to optimize my SQL implementation of the Inverse Simpson Index.

5 (2)

2019-09-12

2,792 reads

The Query Optimizer: Date Correlation Optimisation

  • Article

In SQL Server 2005, a feature was introduced that was hardly noticed, but which might make a great difference to anyone doing queries involving temporal data. For anyone doing Data Warehousing, timetabling, or time-based pricing, this could speed up your queries considerably. Who better to introduce this than Query Optimizer expert, Fabiano Amorim?

2009-10-26

3,485 reads

Statistics Used by the Query Optimizer in Microsoft SQL Server 2008

  • Article

Microsoft SQL Server 2008 collects statistical information about indexes and column data stored in the database. These statistics are used by the SQL Server query optimizer to choose the most efficient plan for retrieving or updating data. This paper describes what data is collected, where it is stored, and which commands create, update, and delete statistics. By default, SQL Server 2008 also creates and updates statistics automatically, when such an operation is considered to be useful. This paper also outlines how these defaults can be changed on different levels (column, table, and database).

2009-07-24

2,506 reads

Blogs

Daily Coping 2 Jul 2020

By

I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to...

Presenting on Ethics in Modern Data at Houston HASSUG/SQL BI Group July 2020 Meeting

By

Looking forward to presenting with my wife Christine Assaf our talk on Ethics in...

MVP for Another Year 2020-2021

By

Early this afternoon I received an email from Microsoft presenting me with the 2020-2021...

Read the latest Blogs

Forums

Daily Coping 2 Jul 2020

By Steve Jones - SSC Editor

Today’s tip is share a happy memory with someone who means a lot to...

Query taking more than 4 hrs. - Any recommendations/suggestions?

By Feivel

One of our stored procs has been running for more than 4 hrs. and...

Unusual use of the WHERE clause

By michael.leach2015

I am working an exercise problem where the solution provided has a WHERE clause...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers