Get MySQL sample databases Sakila, World, and Employees. Follow Windows install steps, verify each import, and choose the right dataset.
Index Design Rules: Ten Don’ts and Where They Break
These index design rules came from a client’s list of ten index don’ts, and readers argued with several of them. This post turns the checkable rules into read-only queries on a demo database, and it measures what each rule really costs. The rest are warnings, not laws, and the post says which is which.
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.
OPTION FAST N: First Rows Sooner, Total Reads Higher
OPTION FAST N tells SQL Server to plan for the first N rows, so the first rows arrive in milliseconds and the whole result costs much more. This post measures both sides on 300,000 rows with logical reads and time to the first row. It also explains why the hint belongs to paging and not to tuning.
Reasons for Slow Performance in SQL Server: The Top Five
The reasons for slow performance in SQL Server fall into five groups: schema design, T-SQL code, indexing, server deployment and hardware. This post tests three of them on a demo database, with logical reads as proof. It also shows a query that checks four deployment settings.
What is the Replacement of DBCC DBREINDEX? – Interview Question of the Week #263
Question: What is the Replacement of DBCC DBREINDEX?
Answer: The answer to this question is very simple.
Here is the syntax:







