![]() ![]() You can take this even farther, and challenge yourself to: ![]() using wait statistics to measure bottlenecks on the instance ( see the episode on my performance tuning process)įinally, add in database and server level anti-patterns.using sp_WhoIsActive to find out what’s slow right now.Some of your bad queries are going to be worse for your instance than others.Īnd what’s the most efficient way to fix the top three queries with the least amount of work?Īfter automating your queries, you can now practice: Practice finding the worst queries and diagnosing a solution One note is that the SQL Query Stress tool originally written by Adam Machanic is now maintained on GitHub by Erik, Ejlskov Jensen.Michael J Swart wrote a great post on generating concurrent activity that lists out a bunch of tools which can help.Some options for running a bunch of queries: You’ll learn quickly that you do have to meter them out in a way, because just running a ton of stuff in a tight loop is going to completely overwhelm your CPUs. One easy way to do this is to set up SQL Server Agent jobs that run the queries in a loop or on a scheduled basis. Once you have a bunch of slow queries, you can create an environment of bad queries. ![]() Use the queries to make an anti-pattern environment I find that the easiest way to do this is to make lots of notes in my TSQL scripts as I go, to remind myself of the performance at different points in the script.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |