Case study – 1,266% faster!

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!

Jose

Jose

I am an Enterprise SQL Server Database Administrator with 10+ years of experience working with complex transactional environments.

Leave a Reply

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

Call Us Now

OR