While order or join hints may not be as bad as index hints, they’re still risky. You’re gambling that your forced execution plan is always going to be better than the one SQL Server would come up with. If you’re just now taking over a SQL Server from somebody else, this means you might have trouble tuning queries by just implementing indexes or changing server settings.

To Fix the Problem

Rewrite your queries to stop using order or join hints.

No, just kidding. Kind of. This isn’t a problem you’re going to fix quickly, but you’ll want to work with the developers on this server to find out why they’re using order hints. Make sure their use is documented, because SQL Server’s engine may have improved since the queries were originally written, and you may no longer need the hints.

If you simply rip out all the hints, you might get better performance – or it might go right down the drain. Tread carefully here. To monitor whether things are improving, keep track of the server’s overall health with Perfmon and monitor runtime of queries that you tweak.

Hi, I used the blitz script and I got great results fo correct with these new database servers I am taking care of. I find out I had some occurences of these hints, can you tell me if there is a way I can find out what queries are using hints?