Delete qualified rows from multiple tables with as few logical reads as you can. This puzzle gives a setup script for three small tables, the two rules for the delete and a starting script that costs 19 logical reads. Your task is to beat that number and stay correct.
SCHEMA_ONLY vs SCHEMA_AND_DATA for Memory-Optimized Tables
Compare SCHEMA_ONLY and SCHEMA_AND_DATA memory-optimized tables, inspect logging and recovery, and test an isolated offline-online cycle.
DBCC DROPCLEANBUFFERS Impact on Memory: See a Cold Cache in Action
DBCC DROPCLEANBUFFERS removes every clean page from memory, so the next query reads from disk. This post counts the pages of one database before and after, shows why a CHECKPOINT comes first, and compares a cold read with a warm read.
PARALLEL_BACKUP_QUEUE Wait on a Slow RESTORE FILELISTONLY
A reader asked me what the PARALLEL_BACKUP_QUEUE wait means. Their RESTORE FILELISTONLY ran for a long time on a backup of about 1.5 TB and ended with a media error. I believe a problem with the backup media makes the command run long and shows this wait.
Sessionizing Events: Grouping Activity Into Sessions by Idle Gap
Your events have a user and a time but no visit ID. Here is how to infer sessions from an idle gap with LAG and a running sum.
What is Source_Database_ID in Sys.Databases?- Interview Question of the Week #232
Question: What is Source_Database_ID in Sys.Databases and why it is mostly NULL? Very interesting question, I received indeed.
sysxmitqueue in msdb: Why It Grows and How to Clear It
Sysxmitqueue in msdb fills up when Service Broker messages cannot leave the server. A tested demo in its own database shows the pile, the reason, a one conversation cleanup and the NEW_BROKER reset. The msdb steps follow the same order.









