Tags » T-SQL

Finding primary key candidates

Probably one of the most common challenges I see when I do ETL and business intelligence work is analyzing a table (or a file) for possible… 1,558 more words

T-SQL

T-SQL Puzzler

I have presented on T-SQL Window Functions at least 30 times over the past five years. I love the comments I get after the presentations. Without fail, at least one person will tell me how the session helped them figure out the solution to a problem they have been struggling with for months. 853 more words

T-SQL Window Functions

Updating linked server columns

Here’s a fun one I came across this week, we had what was supposed to be a relatively simple update statement taking forever to execute. 281 more words

SQL

How does COLUMNSTORE INDEXES improve performance of Data Warehouse?

Introduction

From SQL Server 2012, Microsoft released one of the most important features for querying a large dataset COLUMNSTORE INDEXES.

The columnstore index is the standard for storing and querying large data warehousing fact tables. 609 more words

T-SQL

Deadlock on ALTER DATABASE

I had an interesting problem recently. A database was stuck in single user mode. How exactly was it stuck you ask? Well, 4-5 system sessions were holding locks on the database (and blocking each other). 463 more words

SQLServerPedia Syndication

Using $PARTITION to find the last time an event occured

In a previous post I showed how you can use the $PARTITION system function to force your query to only look at one or more partitions and today I have a semi-practical example of how to use this. 258 more words

SQL