When I need to troubleshoot execution plan reuse behavior, I find the part of identifying the right entries in sys.dm_exec_cached_plans or sys.syscacheobjects problematic. You will find recommendations to first clear...
Both the subquery and join solutions perform reasonably well for calculating running aggregates when you have very small partitions. Because the subquery-based approach requires a separate scan of the data for each...
In Optimizing a Suboptimal Query Plan (InstantDoc #94775) I described a query for which the default plan that the optimizer produced was slower than one that was forced with a hint. Recently I received comments about...
A few weeks ago the book Inside Microsoft SQL Server 2008: T-SQL Querying was sent to the printers, and it should be available in the next few days in the book stores. Like with your kids, I guess you’re not suppose...