[Case Study] We tuned SQL Server Performance and now its 1,266% faster(not a typo)! How did we do it?

Real sample

The procedure below was extracted from a  stored procedure that was found during a database Assessment.

It was causing CPU pressure on the client’s server.

Using the query store

Using it, you can review a list of the highest resource consuming queries and drill down further by selecting individual queries to view more details.

Figure 1 – Top resource consuming queries by CPU time.

What was done

  • Replace the table variables with temporary tables;
  • Create a indexed view and replaced a subquery with it.

The results

Sometimes changes can make TSQL run 20,000% faster, sometimes 50%, other times slicing 20% off the cost is a great help.

Tuning results vary. They vary based on the query’s complexity, how much tuning has gone into it already, etc.

But we rarely can’t make T-SQL perform faster.

We can solve your database performance problems! Contact us!

Mark Varnas

Mark Varnas

Hey I'm Mark, one of the guys behind Red9. I make a living performance tuning SQL Servers and making them more stable. I channel my SQL into our SQL Managed Services, SQL Consulting and our internal database products.

Leave a Reply

Your email address will not be published. Required fields are marked *