Home Blog Page 3

Revisiting ISNULL, COALESCE, and the Perils of Micro-Optimization

10
Almost six years ago--in November of 2004--I posted what would turn out to be one of my most popular blog posts in terms of number of reads, "Performance: ISNULL vs. COALESCE." (If you're curious, the post is dated July 2006 because I was too lazyit was difficult to transition the publication dates over with...

Smashing a DMV Myth: session_id > 50 == User Process

18
Ever since I started working with SQL Server, I've been seeing advice to filter system views based on session identifiers, in order to return only user processes. The general advice is to look for session IDs (or SPIDs) greater than 50. And this seems relatively safe if you look at the system views on...

T-SQL Tuesday #007 and T-SQL Tuesday Has a Logo

0
This month’s T-SQL Tuesday is hosted by Jorge Segarra, the “SQL Chicken.” The topic is rather open ended: What is your favorite new(ish) SQL Server feature? Love the DACPAC? Can’t wait for PDW? Post about it and tell us why! In other T-SQL Tuesday news, we now have a logo. Those of you...

SQL University: Parallelism Week – Part 3, Settings and Options

14
Congratulations! You've made it back for the the third and final installment of Parallelism Week here at SQL University. So far we've covered the fundamentals of multitasking vs. parallel processing and delved into how parallel query plans actually work. Today we'll take a look at the settings and options that influence intra-query parallelism and...

SQL University: Parallelism Week – Part 2, Query Processing

10
Welcome back for the second part of Parallelism Week here at SQL University. Get your pencils ready, and make sure to raise your hand if you have a question. Last time we covered the necessary background material to help you understand how the SQL Server Operating System schedules its many...

SQL University: Parallelism Week – Introduction

13
Welcome to Parallelism Week at SQL University. My name is Adam Machanic, and I'm your professor. Imagine having 8 brains, or 16, or 32. Imagine being able to break up complex thoughts and distribute them across your many brains, so that you could solve problems faster. Now quit imagining that, because...

Extended Events Code Generator v1.001 – A Quick Fix

1
If you're one of the estimated 3-5 people who've downloaded and are using my XE Code Generator, please note that version 1.000 has a small bug: text data (such as query text) larger than 8000 bytes is truncated. I've fixed this issue and am pleased to present version 1.001, attached to this post.Enjoy, and...

T-SQL Tuesday #006: LOB Data

0
Just a quick note for those of you who may not have seen Michael Coles's post (and a reminder for the rest of you): The topic of this month's T-SQL Tuesday is LOB data. Get your posts ready; next Tuesday we go big!

A Warning to Those Using sys.dm_exec_query_stats

14
The sys.dm_exec_query_stats view is one of my favorite DMVs. It has replaced a large chunk of what I used to use SQL Trace for--pulling metrics about what queries are running and how often--and it makes this kind of data collection painless and automatic. What's not to love? But use cases for the view are...

T-SQL Tuesday #005: On Technical Reporting

3
Reports. They're supposed to look nice. They're supposed to be a method by which people can get vital information into their heads.And that's obvious, right? So obvious that you're undoubtedly getting ready to close this tab and go find something better to do with your life. "Why is Adam wasting my time with this...

Popular Posts