SQL Saturday 446–Slow Query, Bring It On


The next two weeks is going to be a whirlwind and it all starts with the SQL Saturday at Portland. There is a plethora of Data Platform subject matter experts who will be descending on the city to mingle with the SQL Family. What’s more a number of them will be surfacing a week later at the SQL PASS Summit as well.

I have always been a big proponent of sharing the knowledge with the community and SQL Saturday is prime way to do that.

The day will get kick started with a keynote session from James Phillips, Microsoft Corporate Vice President of the Business Analytics Product Group. He will present an overview of Microsoft’s Data Platform and Cloud Strategy.

There are multiple tracks which will be running on the same day. It’s going to a be a difficult pick building your schedule but it will also give you a taste of what schedule building for PASS would be like.

  • Admin
  • Architecture
  • Business Intelligence
  • Development
  • Features
  • PowerShell
  • Professional Development
  • Reporting Services
  • Tuning

There are a number of sessions from various known community subject matter experts on various subjects on the tracks listed above. I am really looking forward to this event! This will be an awesome prelude to PASS!

I will be presenting a session on query performance troubleshooting under the Tuning tracks this Saturday which will feature Live Query Statistics and Query Data Store along with a guest appearance from the Query Plan Comparison feature in the latest SQL Server Management Studio.

There is also a SQL Server Clinic at the event. So if you want to chat about questions about SQL Server in your environment or anything data related, then bring them to the experts at the Clinic.

Session name: Slow Query: Bring It On

Duration: 60 minutes

Date: 24th Oct, 2015

Venue Mittleman Community Center

Timing: 10.30am – 11.30am

Session Abstract

Troubleshooting slow performance issues is hindered by lack of available repro or even at times lack of available statistics. This puts the chief troubleshooter in a Catch-22 situation. Without identifying the problem, the issue could resurface again and create another critical business problem. SQL Server 2016 introduces two new features to troubleshoot query performance issues in a reactive and proactive manner namely, Live Query Statistics and Query Data Store. In this session, you will learn about:

1. Using Live Query Statistics to perform live troubleshooting while it is running

2. Using Query Data Store and becoming a SQL superhero by answering questions about query performance with a click of a few buttons

As always, I will update this post with the session deck and any Q&A that comes my way during the event.

The slide deck that I used at the event is available below.

24HOP Session: How to be a Ninja – Troubleshooting SQL PERF on Azure VMs


I have been a bit quiet on this blog but that is partly due to the fact that I have moved into a new role and a new country. I am now a part of the SQL Server Product Group [b|t] and based out of Redmond.

I am actually really excited about this. Sourabh Agarwal [b|t] and I are going to be presenting a preview to our SQL PASS Summit 2015 pre-con session "How to be a Ninja: Troubleshooting SQL performance on Azure Virtual Machines". Yes, we are starting the initiation program of becoming a SQL performance troubleshooting NINJA on SQL Server!

Troubleshooting is an art but the tricks of the trade changed with the advent of Azure Virtual Machines. Performance troubleshooting is different and at the same time very similar to what you have been used to for SQL Server. SQL Server performance on Azure VMs can be a sore point for many as the host troubleshooting entry points are limited and the knowledge of the internal workings scarce.

In this session, we will show you what best practices should be known for SQL Server instances running on Azure Virtual Machines! We will talk about tips on automating the implementation of all these best practices during deployment making this a single one-click deployment. This session will be a pre-cursor to our pre-con where we will go the whole nine yards and detail how to automate deployments from scratch, implement best practices automatically and analyze performance issues magically!

We hope you can join us for this session online and we do hope to see you during our pre-con! The 24Hop sessions are full of great sessions from great speakers in the SQL Family. See the full list here. I would recommend looking through the list and signing up for the ones that you are interested in. This will also give you a preview of what you can expect in the SQL PASS Summit this year.

This 24 Hours of PASS: Summit 2015 Preview event takes place over 24 hours, beginning September 17, 2015, 12:00 UTC. Featuring 24 webcasts delivered over 24 hours, this event provides a glimpse into the unparalleled content on offer at PASS Summit 2015, October 27-30, in Seattle, WA.

WHEN: September 17th at 8AM PST (3PM GMT)
WHERE: ONLINE
Facebook Event for our session: https://www.facebook.com/events/938656286172663/
Registration link for the event: http://www.sqlpass.org/24hours/2015/summitpreview/Registration.aspx

[UPDATE] September 29th, 2015

Thank you for the feedback that you shared after the session. It is always great to know what people liked in the session and even better to know where we need to improve. This helps ensure that our next iteration has the necessary tweaks. We received an overall 90% positive feedback and we thank everyone who attended for that!

The replies to the questions from the session are available below.

Q. Regarding the performance fixes as best practices(hotfixes/CU), do we have separate hotfixes(.msi/msp) for azure environment when compared to on premises environment?
A. The SQL Server installation bits that you would run on Azure VMs and on virtualized/physical on-premises environment are the same. So there aren’t any different set of fixes that need to run on Azure VMs.

Q. Are these Cheat Sheets available online?
A. The cheat sheets are available in the presentation PDF on the 24HOP site.

Q. Is using "Lock Pages in Memory" lead to that total allocated memory amount of SQL Server process is not seen in Windows Task Manager?
A. Task manager is not a good place to look for allocated memory when you want to find out allocations made after enabling Lock Pages in Memory privilege for the SQL Server service account. You could either look at Total Server Memory perfmon counter or the memory DMVs to track SQL Server memory usage. Additional reference: https://msdn.microsoft.com/en-us/library/ms176018.aspx 

Q. Why are you disabling caching on the log file drive?
A. This is due to the IO patterns that the SQL Server transaction log file receives and how Azure storage is structured. We have seen in tests that the performance for SQL Server transaction log is best when write caching is disabled for disks which hosts transaction log files. We will talk about this in detail during our pre-con session.

Q. For Datawarehousing workloads, do you recommend lock pages in memory setting on on-premise/azure VM hosting SQL Server?
A. For on-premise workloads, we recommend you test and ascertain the needs before enabling Lock Pages in Memory (LPIM) privilege. For Azure VM workloads, the first important task is to pick the machine with the right SKU. We recommend enabling LPIM to prevent paging to the local disk on the rack which can negatively affect performance.

Q. Why are there different storage options based on Windows version? Is there any dependency on SQL versions?
A. There aren’t different storage options based on Windows version. The different storage options are based on the performance tier that you want to be on. It is Windows and SQL version and release agnostic.

Q. Can you let me know the resources on Azure Storage?
A. The Azure storage documentation is a good place to start for this. We will talk about this in detail in the IaaS introduction part of our pre-con.

If we have missed any question, please leave your question in the comment section of this post and we will answer it.

Lastly, we loved the notes that Matt Penny [t] took during our session. A screenshot of that is shown below. Thank you Matt! J The 24HOP session presentation is attached on the session page.

Notes

SQL PASS Summit 2012


Nov 6th -9th seemed like a whirlwind with the PASS Summit seeing a record number of registrations and probably a record number of first timers as well! The number of people thronging towards the Washington State Convention Center in the morning was a sight to see! The hotels around the convention center were over booked. If you were one of those individuals who booked late, then you either ended up paying steep prices or not getting your preferred rooms. The evenings of the event days saw most of the eating joints being thronged by the PASS attendees where the networking continue till late into the night!

Not only was this a fun event but I did manage to meet a number of folks (Tweeps) face-to-face that I interact with on Twitter or other technology forums. I did miss out on meeting a few folks that I wanted to but that would have to be now done at another time and place. I also got to meet other folks from the CSS (Bob Ward, Adam Saxton, Rohit Nayak and more) and SQL CAT teams with whom I interact with on a regular basis but hardly get to meet regularly due to the cross geographical locations.

The evening revelry also showed why Twitter is a powerful medium of communication. The venues were decided and broadcasted using the Twitter hashtag #sqlpass. Some of the post event parties had some highlights as well like the flash mob…. The karaoke sessions at the Hard Rock Café…. The Unicorn seemed to be having a ball!! (If you were there, you know what I am talking about).

I had recently co-authored a book, Professional SQL Server 2012: Internals and Troubleshooting, which was launched at the event. There was a book signing session with the authors where we gave 30 books through a lucky draw. Thank you SQL Sentry for sponsoring this! Smile

image

I was also part of the SQL Server Clinic on all three days. I met with various customers who brought their design and troubleshooting related questions which spanned all areas of the product. We were staffed at the clinic with the engineers from all areas of expertise. So it was just a matter of walking up to the SQL Server Clinic, locating the expert and asking your question. I even looked at memory dumps at the Clinic! Smile Below is picture of one of the peak times at the clinic. The green shirts are the folks that were answering the questions!

image

#SQLFamily truly rocks! And this year’s #SQLPASS summit was #Awesome! – That is my Twitter update summarizing the event!