Ramblings of a SQL Hillbilly

Or, the mad ravings of a data warehouse forklift operator

Temporary Query Items: Temporary Tables

Note: This is part of a series on Temporary Query Items.

Previously, on TQI…

We’ve talked previously about what a Temporary Query Item is and how scope, indexing, statistics, TempDB, and memory can all affect your choice of TQI for your queries. It’s all been important discussion, if a little unsexy – go back and read it if you haven’t, or you may get a little lost. If you have (no really, read it first!), then you’re ready to walk through our first Temporary Query Item – Temporary Tables.

Temporary Query Items: TempDB and Memory

Note: This is part of a series on Temporary Query Items.

In previous posts, I’ve talked some about what Temporary Query Items are and why you might need them. I’ve also given an overview of scope and how it might affect your choices of TQIs for your own queries. Likewise, I’ve worked through indexing and statistics, a reasonable understanding of which can help to understand the advantagese and disadvantages of some TQIs. Now, I’d like to talk a bit about TempDB and memory, and how they can also affect your choice of Temporary Query Item.

Temporary Query Items: Scope

Note: This is part of a series on Temporary Query Items.

Last time we took a look at what a temporary query item is, and why it is useful. In this post, I’ll be looking at how Scope plays into the similarities and differences among Temporary Query Items. An understanding of scope and how it relates to each TQI is crucial to being able to choose the best one for your situation, which is why I’ve dedicated an entire post to it.

Temporary Query Items: Introduction

Note: This is part of a series on Temporary Query Items.

While working with one of my junior developers on a query one day, I discovered that she had inadvertently deleted a few records due to not understanding how a CTE maps back to the underlying data. I was able to quickly resolve the issue thanks to how our testing environment is set up, but it prompted me to create a presentation on what I call Temporary Query Items. What I was really looking for was different ways to use and reuse transformed, abbreviated, or combined data sets in queries. Turns out, in SQL Server we have plenty of options for that, depending on what your requirements are, and so I was able to put together a pretty good presentation on the upsides and downsides of each. In this series of posts, I’ll be exploring what I cover in my presentation. This post: An intro to Temporary Query Items.

T-SQL Tuesday: Why So Serious?

For this month’s T-SQL Tuesday, Matt Velic has chosen the topic of Dirty Little Tricks you can play on your coworkers/developers/those $@%! consultants using T-SQL. I’m a bit impish, so naturally it was time to dust off the ol’ blog for this topic!

Accidents - Happy and Otherwise

I have been blessed throughout my life by an abundance of good fortune. You might call it serendipity – a series of happy accidents, all leading me to my current position. This is not to discount my natural talent nor my hard work, but I do admit that it all seems a little strange looking back. Perhaps I’m too quick to forget my failures, or at least the ones that didn’t direct me to where I am now.