Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLWATCH 4.5 XES "SQLWATCH_query_problems" slows performance of database creation #466

Open
monteroman opened this issue Dec 21, 2022 · 12 comments

Comments

@monteroman
Copy link

Did you check DOCS to make sure there is no workaround?
https://sqlwatch.io/docs/

Describe the bug
This was something we noticed when creating a new SharePoint database on our SP2019 environment which runs many queries to create the database. I also so this on one of our monitoring servers during an upgrade. When the SQLWATCH_query_problems Extended Event session is running, it can take about an hour to create a new content database for SharePoint. When I stop the XES, and go back and create another database, it takes 2 minutes.

To Reproduce
Steps to reproduce the behavior:

  1. Go to SSMS --> Management --> Extended Events --> Session
  2. Turn off SQLWATCH_query_problems
  3. In SharePoint, create a new content database through the PowerShell command "New-SPContentDatabase" - time is about 2 minutes
  4. Turn on SQLWATCH_query_problems
  5. In SharePoint, create a new content database through the PowerShell command "New-SPContentDatabase" - time to complete is about 55 minutes.

Expected behavior
The process should only take a couple of minutes to complete.

Screenshots
image

Windows Server (please complete the following information):

  • Win2019 Server, latest OS Patches through 11/2022

SQL Server (please complete the following information):

  • SQL Version: 2019 (15.0.4261.1)
  • SQL Edition: Standard Edition

SQL Server Management Studio (SSMS -> about -> copy info):
SQL Server Management Studio 15.0.18424.0
SQL Server Management Objects (SMO) 16.100.47021.0+7eef34a564af48c5b0cf0d617a65fd77f06c3eb1
Microsoft Analysis Services Client Tools 15.0.19750.0
Microsoft Data Access Components (MDAC) 10.0.17763.3650
Microsoft MSXML 3.0 6.0
Microsoft .NET Framework 4.0.30319.42000
Operating System 10.0.17763

SQLWATCH version (from DACPAC or from sysinstances)

  • 4.5.0.534

Additional context
I had opened a case with Microsoft to help with trying to determine if it was a SQL issue or a SharePoint issue, but they were able to prove it wasn't SharePoint and they could not determine why SQL was causing the problem. They ran PSS Diag's on SQL and tried to find something in the log files, but were unable to. We were able to come up with the same slowness results in both our dev environment and prod environment. In both instances, when I shut off this XES, the issue disappears.

@marcingminski
Copy link
Owner

Was this session enabled by default after installation? I don’t think this should be enabled all the time but I can’t find any guidance where it states that.

@monteroman
Copy link
Author

monteroman commented Dec 21, 2022 via email

@marcingminski
Copy link
Owner

Thank you for this. I’ll revise it.

@monteroman
Copy link
Author

monteroman commented Dec 21, 2022 via email

@marcingminski
Copy link
Owner

  • Blockers enable for sure.
  • Waits - enable as it captures queries that causes excessive waits (if you have lots of queries with waits this session could cause trouble)
  • Long queries - disable and I’d expect people to tweak this to their needs (you know - how long query is a long query)
  • Health - disable, it causes problems
  • Query problems - (can’t find the guidance but I was expecting this to be turned on on demand for a specific need)

@monteroman
Copy link
Author

monteroman commented Dec 21, 2022 via email

@marcingminski
Copy link
Owner

You’re welcome and I really appreciate you raising this as otherwise it would have never been captured.

@monteroman
Copy link
Author

monteroman commented Dec 21, 2022 via email

@marcingminski
Copy link
Owner

Yes that’s the plan (and I was under the impression that this was already done this way)

@monteroman
Copy link
Author

monteroman commented Dec 21, 2022 via email

@monteroman
Copy link
Author

You can go ahead and close this issue since now, after turning off the XES, my performance issues were resolved immediately.

@marcingminski
Copy link
Owner

Thanks. I’ll keep it open until I fix the XES status during deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants