Sql-Server

Category: sql-server

Running SQL Server in a Docker Container on a Mac

Running SQL Server in a Docker Container on a Mac

A user recently asked me what a good use case might be to run SQL Server on Linux in a Docker container.

Continue reading

The COMPRESS() TSQL Function in SQL Server 2016+

The COMPRESS() TSQL Function in SQL Server 2016+

on July 31, 2017

Category: sql-server

One cool little feature in SQL Server 2016 is COMPRESS(). It’s a TSQL function available in all editions that shrinks down data using the GZIP algorithm (documentation).

Continue reading

IF Statement Branching and Parameter Sniffing

IF Statement Branching and Parameter Sniffing

on July 12, 2017

It can be tricky to remember that SQL Server doesn’t short circuit on IF statements in stored procedures. Even when you know this, sometimes it’s hard to recognize the impacts.

Continue reading

How to Enable the Debug Channel in Extended Events for the Query Thread Profile XEvent in SQL Sever 2014+

How to Enable the Debug Channel in Extended Events for the Query Thread Profile XEvent in SQL Sever 2014+

on June 19, 2017

Category: sql-server

Microsoft recently gave us a more lightweight way to trace data related to execution plan performance. As of SQL Server 2014 SP2, you can trace the query_thread_profile Extended Event.

Continue reading

When does a Snapshot Transaction Really Begin?

When does a Snapshot Transaction Really Begin?

on June 12, 2017

They say, “never read the comments” on the internet, but I’m lucky to get lots of interesting points and questions in my comments.

Continue reading

When does physical reads include read-ahead reads in SQL Server?

When does physical reads include read-ahead reads in SQL Server?

SQL Server has more than one way to pull pages in from disk for your queries. SQL Server can do a physical read of an 8KB page, or an extent of 8 ย of those 8KB pages.

Continue reading

Top 5 Misleading SQL Server Performance Counters

Top 5 Misleading SQL Server Performance Counters

on June 5, 2017

Perfmon counters are an excellent tool for monitoring and sometimes troubleshooting Microsoft SQL Server. But some counters can get you into trouble, because they don’t mean what many people think. Learn what to look out for in the world of widely-used perfmon counters.

Continue reading