I love SQL Server Performance Tuning challenges. Recently while working with my client on Comprehensive Database Performance Health Check I ended up in a very interesting situation where my client wanted me to write an Efficient Query. Let us learn in today’s blog post how to write an efficient query.
The real challenge is the definition of an efficient query. Everybody has their own definition of an efficient query. In today’s SQL in Sixty Seconds video, I discuss the definition of the efficient query and also explain my real-world experience with my client.
Some people think that the query which ran in the least amount of time is efficient and some people think the query which has used the least resources is efficient. I have seen often DBAs considering the query which is taking the least amount of the execution cost as the most efficient query.
I strongly recommend everyone to watch this video and give your feedback. I personally believe that we should first identify the bottleneck which our client is facing and based on the resource bottleneck one should write the query.
You can always write a query which takes the least time or least resources and it would be best to write a query which is the best suitable for your server. If you have any confusion about this blog post, you can reach out to me by leaving a comment on the YouTube Channel.
Reference:Â Pinal Dave (https://blog.sqlauthority.com)
1 Comment. Leave new
I’ve frequently been asked to make a query ‘more efficient’. My first question is to ask their definition of “efficient”. Your video provides a great example of why the definition matters.
Thank you.