Monthly Archives: January 2017

Set based vs row by row (procedural code)

By | January 25, 2017

I was reading a blog about how to write procedural code today ( link below) and wanted to take a moment to explore another approach just to provide a more complete reference. To provide some context I am explaining the business case here. A hospital wants to identify people whose heights have changed over time… Read More »

Calculating Pi in MS SQL Server

By | January 17, 2017

PI is a very commonly used mathematical constant, in fact it is probably more famous than the equation E=MC2. We might not find a lot of use for it within the database community but it is a fascinating value to calculate and so we set out to do just that. First we tried using the… Read More »

Actual vs Estimated plan and the use of Time to arrive at the best plan

By | January 2, 2017

I came across a comment on linkedin today about the difference between the actual and estimated execution plan in SQL Server and how it is used to determine performance issues. I wanted to point out that the estimated and actual execution plans are most of the time similar but there are plenty of cases where… Read More »