Part 0 - Introduction and All That Stuff.... Hello, wonderful coders! Are you ready for another thrilling adventure into the world of technology? Today, we're diving deep into the mystifying and magical world of SQL Server performance tuning. That's right, my intrepid readers, we're about to unravel the secrets behind a faster, smoother, and more … Continue reading SQL Server Performance Tuning: A Far From Almost Comprehensive Guide for the Curious Coder
Category: DBA
Getting Started in “Data”
Here I’m talking to someone trying to break into “Data” as a career field in a small to medium sized company. This might mean moving from help desk or marketing or customer service to DBA, Data Analyst, or Data Engineer. These data jobs reflect a LOT of overlap when you work in smaller companies, as I … Continue reading Getting Started in “Data”
Setup a Simple Transactional Replication lab
At my former employer, one of the key components of our Business Intelligence environment was transactional replication of data between production and the Data Warehouse. Because this replication was critical to our reporting/BI pipeline, not to mention my livelihood, I wanted to dig into to how transactional replication works. As usual for me, the first … Continue reading Setup a Simple Transactional Replication lab
Part 1: SQL Server Performance Tuning: A Far From Almost Comprehensive Guide for the Curious Coder
Section 1: Why Performance Tuning Matters – A Deeper Dive with Examples Ah, my knowledge-thirsty friend, you're in for a treat! Let's delve deeper into the significance of performance tuning and explore some examples to illuminate the benefits of this enigmatic art. Performance tuning is like casting a magic spell on your SQL Server, transforming … Continue reading Part 1: SQL Server Performance Tuning: A Far From Almost Comprehensive Guide for the Curious Coder
Can Table Partitioning Improve Query Performance?
At work we have tables containing billions of rows, and are hundreds of GB in size. The business intelligence queries we run against them in the reporting database are often focused around dates and not accountids / productids as they are in PROD. For these large tables, it is sometimes useful to split the records … Continue reading Can Table Partitioning Improve Query Performance?
How much space will table compression save me?
At work we have a reasonably large table with a NVARCHAR(MAX) column. This column stores HTML and other user generated content. This table is on a SQL Server 2014 instance, so cannot take advantage of new compression technologies in SS 2016. Looking at the estimated benefits via query: Well … bummer! Looks like no savings … Continue reading How much space will table compression save me?
Create an index on a table in Transactional Replication
Not long ago I took over a database that uses Transactional Replication. Not long after I needed to add an index. So here is the syntax and misc I found for doing this: The important point is that you use ONLINE=ON, and since our TEMPDB is on SSD, go ahead and use SORT_IN_TEMPDB.
Get rid of blank lines in SSMS
I often copy paste the output of "sp_helptext" for some of our stored procedures. For whatever reason, they often paste with numerous blank lines between each meaningful section of code. Here is how I get rid of those lines: