i noticed the sqlhealth extende event is on by default , so can i reduce

  • hi,

    i noticed the sqlhealth extended event is on by default , and it logs many thing,

    Q1) can i reduce few thing so that file size and recording that is wirting from buffer to file can be reduced, thus i will save some resources.

    q2) and can i add few events which are required by be like queris which takes more than 15 sec should be logged using

    sql_statement_completed,sp_statement_completedsl

  • Q1) You can. I wouldn't because, for most people, this thing is back there running and they never know. It's the hyper-rare workload that will see actual interference from this. Plus, if you want to use it, it gathers enough data that, if anything, you should expand the file size so that it rolls over less, sticking around longer. I'm not saying do that either, see reason #1 for why, but I'd lean more towards making that adjustment than the other way.

    Q2) Don't do that. Nope, nope, nope, nope. Don't do that. Statement completed events without filters will generate metric tonnes of data. It will utterly overwhelm the other data being captured within system_health. You'll see nothing but files rolled over, filled with statements and no deadlock graphs, long blocks, or any of the other useful information in system_health.

    Generally speaking, I'd advise two things. First, just leave system_health alone. It's fine. It's probably not harming your systems in any wya. Second, do take advantage of the information it's capturing for you, for free, all the time, on all your servers. Way too many people just don't even know it exists. I teach on Extended Events regularly and easily half the people I talk to have never heard of it. You're ahead of the curve here.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply