In case I needed a reminder of how cool columnstore indexes are for analytic queries, I made this example to jog my memory. I used the StackOverflow 180 GB sized database you can download from Brent Ozar's site. I have it running in VMWare Workstation pro, but these days you can run your SQL Server … Continue reading Columnstore Index Goodness
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
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”
Dedupe it or lose it!
The scenario is there should only be one AccountID/CreateDate combo in our table1. But some process ran and has duplicated some rows and we want to get rid of them. Dedupe time! Here is an example of deduping: Now let’s see what lives in our table1: Now let’s look at the Query to group the … Continue reading Dedupe it or lose it!
JOIN versus WHERE filtering
Intellectually I knew that query results can vary depending on where we decide to "filter" our data. In the JOIN condition, or in the predicate WHERE clause? The following example of this revealed itself recently. It struck me as such a simple and clear case I thought others might benefit from it. The situation arose … Continue reading JOIN versus WHERE filtering
How I Learned to Stop Worrying and Add The Nonclustered Index
In my post about transactional replication we configured the dbo.Badges table for replication. Recall that this is a table that lives in the StackOverflow database. Let's pretend that over time the production table we replicated has grown to billions of rows, and our reporting relies on hitting the dbo.Badges subscriber table in the SO_small … Continue reading How I Learned to Stop Worrying and Add The Nonclustered Index
The Path to Enlightenment – SQLSkills style!
Too often in my career I have heard "SQL Server doesn't scale as well as DBMS x" or "We don't need a DBA. You just install SQL Server and it runs itself". Both of these are misconceptions that are reinforced by a lack of people who truly understand the deep magic that is SQL Server … Continue reading The Path to Enlightenment – SQLSkills style!
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?
Nice date labels in SSRS
You have a create date in Datetime format (ugly!). You want to create a nice row label of out that for your SSRS report. Well here ya go!: Set the text box to an expression: =MonthName(Month(Fields!CreateDate.Value))&" "& Year(Fields!CreateDate.Value) This will give you a nice date label like "December 2015". For an even snazzier label, I … Continue reading Nice date labels in SSRS