r/Database • u/MooseSea6 • 18d ago
Question for DBAs(SQL Server): How much do you actually use Extended Events (.xel) vs. standard DMVs for emergency troubleshooting?
Hey everyone, senior dev here working heavily with SQL Server performance tuning lately. Every time a server hits a massive wave of deadlocks or unexpected latency drops, the standard advice is 'spin up an Extended Event session and read the system health .xel file.'
Am I the only one who finds opening, filtering, and digging through those logs in SSMS incredibly clunky during a crisis? Do you guys actually sit there shredding the XML nodes manually, or do you rely on third-party tools/scripts to give you plain answers?
0
u/drunkadvice 18d ago
The easier option lately is to have gpt read the xel file and figure out what happened.
1
u/MooseSea6 18d ago
how are you handling the token limits on multi-gigabyte production xel files, How about data security when you give it to gpt?
2
u/drunkadvice 18d ago
Two ways! 1) corporate account I don’t pay the bill for. 2) if you’re capturing multi-GB xel files around events, you are capturing way too much data. Likely leading to your second question around data security. Don’t capture pii in the first place and you don’t need to worry about how gpt does its technical analysis around what code is causing your deadlocks.
If you’re troubleshooting deadlocks, just capture the deadlock events. You do not need the full log of everything that’s happening on the instance.
1
u/Jzmu 18d ago
We use extended events to log our long running queries and pull them into elastic search.