COUNT OVER helps me keep a page’s row count separate from the filtered total. Compare full and partial pages. An empty page needs an explicit total-count contract.
Find the Last Read and Write Time of Every Table in SQL Server
Find the last read and write time of every table in SQL Server with sys.dm_db_index_usage_stats. The tests show what counts as a read, why an insert counts as a write, what an index rebuild does to the numbers, and what wipes them.
SQL SERVER – Minimum Maximum Memory – Server Memory Options
While reading about server memory options, I learned the lowest value you can set for max server memory is 16 MB. Anything lower is reset to 16 MB.
SQL SERVER – List of all the Views from Database
Hundreds of Views and no idea which are indexed? A quick query on sys.views lists every view with its schema and whether it is indexed or indexable.
Resumable ADD CONSTRAINT in SQL Server 2022: Pausing a Primary Key Build
Use resumable ADD CONSTRAINT in SQL Server 2022 to pause a key build, inspect progress, resume safely, and understand abort behavior.
hierarchyid GetLevel: Count the Path Depth
hierarchyid GetLevel identifies depth within a logical path. The read-only example distinguishes the root, children, grandchildren and a fractional sibling label.







