January 9, 2018

Sometimes for testing purposes (or an emergency) one might find it useful to remove query plan for a single stored procedure. This way you won't have to disrupt the entire instance (and possibly anger your fellow developers!).

I often forget that DBCC FREEPROCCACHE acce...

November 7, 2017

This post is meant to be a quick primer on Table Partitioning in SQL Server. 

What is it?

Let's say you have a large table that is accepting a lot of transactions, partitioning allows you to scale this particular table out into different (physical partitions). Thus sprea...

October 25, 2017

An elegant function for a more civilized age:

Another way to detect deadlocks is to utilize the TRY CATCH block to raise errors in TSQL code. I found this to be a very elegant way of detecting deadlocks pragmatically. You can use the below code sample in a stored proced...

June 21, 2017

 Not always optimal...

What is it?

Let’s say you have a parameterized proc, and it creates and caches an execution plan based on certain values for said parameters. It “sniffs” the parameters and uses that for cardinality estimation.

Then you run this stored proc again, b...

Please reload

Please reload

RECENT POSTS: 

FOLLOW ME:

WHO AM I ?

My name is Aamir Syed and I run SQLEvo. I optimize the speed, efficiency, and stability of SQL Server.  When not working I like to lift weights, play music, and travel with my wife.

  • Facebook - Black Circle
  • Twitter - Black Circle
  • Instagram - Black Circle
  • LinkedIn - Black Circle
  • Facebook - Black Circle
  • Twitter Round
  • Instagram Black Round
  • LinkedIn - Black Circle