Tag: TSQL

Single-Row Deadlock

Introduction Demonstration of the smallest possible deadlock: only one statement, one table, one row. Without transactions (no BEGIN TRANSACTION). Even RCSI (Read Committed Snapshot Isolation) is turned ON to eliminate shared locks. Everything is “by the book” as Books Online

Tagged with: ,

Query with optional filters (catch-all query)

In almost every database we have a process that filters the same data with different filters. Typically, query is within a stored procedure that has many filtering parameters that are optional. The problem is – a query optimized builds only ONE plan that will handle every filter combination you throw at it.

Tagged with: , , ,
Top
Visit Us On TwitterVisit Us On FacebookVisit Us On LinkedinVisit Us On YoutubeVisit Us On Google PlusCheck Our Feed