This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Two hands with scoops of vanilla and strawberry ice cream both reaching for the same single cone.

UPDATE With a JOIN: Changing Rows From Another Table Safely

February 12, 2010
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Joins, SQL Server, SQL Transactions

Use UPDATE with a JOIN safely, reject duplicate source keys, compare subquery and MERGE behavior, and verify the affected rows.

Read More
Hands splicing two ropes together, one strand slipping loose

MERGE Statement Pitfalls

January 10, 2010
Pinal Dave
SQL Tips and Tricks
Output Clause, SQL Server, SQL Transactions, SQL Trigger

MERGE statement pitfalls include duplicate source keys, concurrency races, trigger surprises, and complex actions that deserve testing.

Read More
SQL Server creation of index with ignore duplicate key.

SQL SERVER – Unique Nonclustered Index Creation with IGNORE_DUP_KEY = ON – A Transactional Behavior

January 6, 2010
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Scripts, SQL Transactions

When is IGNORE_DUP_KEY = ON useful? Jacob Sebastian and I built an example that shows its transactional behavior when you insert only nonduplicate rows.

Read More
Temp Table and Table Variable execution differences.

SQL SERVER – Difference Temp Table and Table Variable – Effect of Transaction

December 28, 2009
Pinal Dave
SQL Performance
Best Practices, Database, SQL Scripts, SQL Transactions

Temp table versus table variable, part two: a transaction rollback undoes changes to a temp table, but a table variable keeps its values.

Read More
An unattended hay wagon stands in the middle of a narrow stone bridge while a line of cyclists waits behind it.

Following a Blocking Chain to the Head Blocker

November 27, 2009
Pinal Dave
SQL Performance
DBA, SQL DMV, SQL Lock, SQL Transactions

Follow SQL Server blocking_session_id through a blocking chain, identify the head blocker, and choose a safe ending for the wait.

Read More
Beach towels laid edge to edge on the sand, seen from above, one red towel overlapping its neighbor

Preventing Overlapping Date Ranges in a Table

October 31, 2009
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL DateTime, SQL Server, SQL Transactions, SQL Trigger

Detect overlapping date ranges with joins and window queries, use half-open endpoints, and enforce the rule with a multirow trigger.

Read More
A grey seal asleep across the only path to a cove while a person with a red paddle waits behind it

Finding Sleeping Sessions That Still Hold Locks

June 19, 2009
Pinal Dave
SQL Performance
SQL DMV, SQL Lock, SQL Server, SQL Transactions

Find sleeping sessions with open transactions, inspect their locks and last batch, and identify the application owner before ending work.

Read More
Previous 1 … 9 10 11 12 13 14 15 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com