Cardinality estimation and performance depend on each other: the optimizer guesses a row count, and that guess picks the plan and sets the reads. This post tests one query under the old and the new estimator on SQL Server 2025, shows where the new guess wins and where it loses, and explains how to switch estimators with the smallest possible change.
New Cardinality Estimation: What Changed Since 2014
The new cardinality estimation guesses row counts differently from the old one. This post tests both on SQL Server 2025 with one query, shows three switches that choose the model, and gives a safe way to upgrade.
CE Feedback for Expressions in SQL Server 2025
Inspect CE feedback for expressions in SQL Server 2025, check compatibility and Query Store, and observe repeated execution evidence.
SQL SERVER – Convert Seconds to Hour : Minute : Seconds Format
A reader needed to convert seconds to Hour : Minute : Seconds format for a web page report. Here is a simple T-SQL script that does it.
SQL SERVER – Validating If Date is Last Day of the Year, Month or Day
A reader asked how to check if a date is the last day of the year, month or week. There is no built-in function, so here is the one I wrote.
SQL SERVER – Script to Find First Day of Current Month
Michael Usov suggested a quick way to find the first day of current month while keeping the DATETIME datatype, with or without the time part.






