Use forcing a plan in Query Store with verified IDs, then audit force failures and runtime results every week so the fix stays useful.
Canceled Query Plan: Three Ways to Capture It in SQL Server
A canceled query plan can be captured with Live Query Statistics, with a live plan query while the statement runs, or from Query Store after the cancel. This post runs a long query, reads its plan while it runs, cancels it and then reads the aborted run from Query Store. It also explains which plan each method returns.
Stale Statistics: Detecting and Updating Them
Detect stale statistics with update properties, review modification thresholds, and schedule targeted refreshes with recorded outcomes.
Remove Cached Plans Not Used for a Set Time in SQL Server
To clear cached plans not used for a set time, list the plans by their last execution time or by the time they were built, then clear each one by its plan handle. This post builds a small procedure that previews the plans first and removes them only when you switch it on. It also explains why the plan handle needs its 0x prefix.
Last Query Cost in MySQL: Read It With SHOW STATUS
The last query cost in MySQL is a number the optimizer computes for the last query it compiled, and SHOW STATUS LIKE ‘Last_query_cost’ returns it. This post shows the command on a Sakila query, explains what the number means and where it misleads. It also points to EXPLAIN FORMAT=JSON for the cost of each part of a plan.
SQL SERVER – Stream Aggregate and Hash Aggregate
Recently during the on-demand consultation, I was asked a very interesting question about Stream Aggregate and Hash Aggregate.
DISABLE_PARAMETER_SNIFFING Hint: Turn Off Sniffing for One Query
The DISABLE_PARAMETER_SNIFFING hint makes one query ignore the parameter value it was first compiled for. This post compares it with the default, OPTIMIZE FOR UNKNOWN and RECOMPILE on a table where one customer owns 40 percent of the rows. The reads show which variant fits which workload.







