The LOOP, HASH and MERGE Join Types

Today I’ll talk about the available JOIN operator types in SQL Server (Nested Loops, Hash and Merge Joins), their differences, best practices and complexity. For the samples in this post, we’ll use the free AdventureWorks database sample available here: http://msftdbprodsamples.codeplex.com/releases/view/4004 Introduction: What are Join Operators? A join operator is a type of an algorithm which… Read More The LOOP, HASH and MERGE Join Types

The "IGNORE_DUP_KEY" option in Primary Keys and Unique Indexes

Unlike foreign keys, primary keys and unique indexes cannot be “untrusted”. There’s no “NOCHECK” option for unique constraints. The closest there is, is the “ignore_dup_key” option. “Hmm… That sounds interesting”, you must be thinking. But let me stop you right there, buddy. Read this before you go off doing something potentially dangerous… Very, VERY dangerous.… Read More The "IGNORE_DUP_KEY" option in Primary Keys and Unique Indexes

The Curious Case of Collations and Performance in SQL Server

One fateful night, cold and dreary, I’ve stumbled upon an apparently little known fact about SQL Server – specifically SQL Server collations and how they affect performance… Yes, really!

While normalizing a table in their database, one of my clients had weird and inconsistent performance problems and couldn’t find a solution for it for quite a while.… Read More The Curious Case of Collations and Performance in SQL Server

Using Reporting Services as your Software Frontend

Microsoft SQL Server Reporting Services is an excellent and easy-to-use platform for creating, viewing, managing, and subscribing to reports of all shapes and sizes. Technically, this platform is meant for nothing more than reports. I mean, it’s true that reporting is a huge field and you can do all kinds of cool stuff with it,… Read More Using Reporting Services as your Software Frontend