What is Page Life Expectancy (PLE)? A quick query to read it from sys.dm_os_performance_counters, the recommended minimum of 300 seconds, and what it means.
SQL SERVER – Finding Memory Pressure – External and Internal
A quick query to find external and internal memory pressure in SQL Server and see how much memory each memory type is using right now.
Restoring a Sample Database to New Folders With RESTORE FILELISTONLY
Use RESTORE FILELISTONLY to map backup files to local folders, restore a separate sample copy, and verify its data and log paths.
hierarchyid IsDescendantOf: A Node Includes Itself
hierarchyid IsDescendantOf tests membership in a subtree, including its root. These literal paths keep both compared nodes visible and distinguish self from a strict descendant.
SQL SERVER – Solution – Challenge – Puzzle – Usage of FAST Hint
The solution to my puzzle on the usage of FAST hint: Brad Schulz shows an AdventureWorks example where the FAST hint really improves performance.
SQL SERVER – Puzzle – Error While Converting Money to Decimal
The answer to my puzzle on Converting Money to DECIMAL(5,2): why it fails with arithmetic overflow, and why DECIMAL(7,2) works, since precision includes scale.
Unpivoting Columns Into Rows With CROSS APPLY and VALUES
Use CROSS APPLY and VALUES for unpivoting columns, retain nulls deliberately, preserve labels, and turn paired fields into aligned rows.







