Case study – Removing a bad SQL query hint

Here what can be done when you have one of our DBA plans.

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

What was done

We removed the MAXDOP hint.

In this case, the procedure was refactored, but the dev team did not change this query hint.

 

The results

The result, you can see below.

Technical background

MAXDOP is a query hint that can be added to the end of your SQL query to control parallelism. When you use MAXDOP, you specify the maximum number of parallelism threads that SQL Server uses for that query.

As with all query hints, it is recommended that you know internally what you are controlling by specifying this hint.

Sometimes DBA’s are forced to work with what we have and choose one evil over the other. A temporary solution for a problem can be forgotten and becomes permanent.

Learn more about the MAXDOP setting in the SQL Server.

Check out more case studies here!

Share this post

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest
Share on print
Share on email

Leave a Comment

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

4.8/5

42

TESTIMONIALS