Blaming the user is the oldest joke in IT. Here’s why it fails, and how NOT NULL, CHECK, UNIQUE and foreign keys stop bad data before it lands.
OPTIMIZE FOR and RECOMPILE Hints Compared
OPTIMIZE FOR and RECOMPILE address parameter-sensitive plans differently; compare stable representative values with per-run compilation cost.
Keyset Paging: Continue After a Date and ID Cursor
Keyset paging continues after a saved ordering key instead of counting past an offset. A date and unique ID together keep equal-date rows in the sequence. A guarded disposable fixture makes the boundary conditions explicit.
SQL SERVER – SELECT * FROM dual – Dual Equivalent
Oracle developers often miss the DUAL table in SQL Server. I explain what DUAL is, why SELECT * FROM dual fails with Msg 208, and the dual equivalent to use.
SQL SERVER – Identifying Statistics Used by Query
Can you find the statistics used by query? There is no direct tool or DMV for it, but I explain an indirect way through the indexes a query uses.
Fast Exports With bcp
Fast exports with bcp compares native and character files, shows a format file, and explains where batch size helps and how to check a large export.
Fixing Invalid Geography Polygons and Ring Orientation
Diagnose invalid geography polygons with STIsValid and IsValidDetailed, repair with MakeValid, and check ring orientation and EnvelopeAngle.







