Common table expressions for readability name query steps and support recursion, but they do not promise cached intermediate results.
geometry STDistance: Measure the Closest Points of Two Shapes
geometry STDistance measures the shortest distance between points belonging to two represented shapes. I compare an interior gap with an endpoint gap. Intersecting shapes provide a useful zero-distance case.
SELECT * in Production Code: The Hidden Costs
See the real costs of SELECT * in production code: lost covering indexes, lookups, stale view metadata, broken inserts and wider results.
SQL SERVER – Making Database to Read Only – Changing Database to Read/Write
A reader attached a client database and it showed as Read Only. Two simple ALTER DATABASE scripts switch a database to READ_ONLY and back to READ_WRITE.
SQL SERVER – TempDB in RAM for Performance
TempDB in RAM needs a review of capacity, support and memory pressure. I compare those costs with the bottleneck it would address.
OFFSET FETCH Paging and Its Deep Page Problem
Use OFFSET FETCH with a unique sort order, compare early and deep page reads, and decide when a cursor based approach fits better.







