I am just a medium, SQL Server the Goal

Monthly Archives: January 2016

SQL Community Session–Indexing Basics and Writing Optimal Queries

Back in December 2015, I had the privilege to present a couple of sessions to the SQL Server Community in Delhi-NCR region in India. During the sessions I talked about the following topics.

  1. Indexing Basics
  2. Writing Optimal Queries.

As part of the Indexing Basics session I covered the details around clustered index, non clustered indexes and the access patterns SQL Server uses, making use of the indexes available to get the data.

In the Writing Optimal Queries session, I talked about a few examples of how certain query constructs can lead to performance issues. For some of the Demos’s during this session, I reused the scripts from the following blogs

  • Paul Randal’s blog around Clustered GUIDs and associated fragmentation
  • Bart Duncun’s blog on Row Goal Issues
  • Paul White blog on Distinct Aggregations
  • SQLCAT team blog on Query Anti Patterns and blog on Temp Table vs. Table variables

The scripts and slides used during the sessions are included below.

Indexing Basics (Scripts)

Writing Optimal Queries (Scripts)