Development

The Art of the Execution Plan

Execution Plans
24 Comments
There’s beauty everywhere – even in SQL Server.  I was just staring at this plan when I was struck by its beauty: Stored Procedure Part 1 Oh, sure, it’s ugly, and I recoiled in horror at first, but when you get over that reaction, there’s an amazing amount of stuff there.  Someone – probably many…
Read More
Query Execution Plan

Sargability: Why %string% Is Slow

T-SQL
44 Comments
People love to search. Google has us addicted to fast, easy search functions.  Users expect every application to have a built-in blazing-fast search functionality.  To pull that off, developers build search queries that let users enter a string, and we ask SQL Server to find matches.  For example, say our users need to find some…
Read More

Why Use Schemas?

Development
100 Comments
The ever-insightful Buck Woody (Blog – @BuckWoody) wrote a post telling you to use database schemas.  He writes: “But I still see a lot of applications, developed by shops I know as well as vendors, that don’t make use of a Schema. Everything is piled under dbo…. But if you’ll use them properly you can…
Read More

Simon Sabin’s talk on query performance

Execution Plans
1 Comment
At #SQLbits, Simon Sabin (Twitter) talked about car crash queries: queries that suddenly have bad performance out of nowhere, yet if you copy/paste them into SQL Server Management Studio, they run quickly.  The culprit is often parameter sniffing: the engine looks at the query and builds a plan, but if the parameters in the WHERE…
Read More