How To Troubleshoot a Slow Running Query in SQL Server Extended Events & Wait Stats (by Amit Bansal)

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • Looking for comprehensive, deep-dive training on SQL Server Performance Tuning? Explore SQLMaestros All-In-One Performance Tuning Bundle. Five courses at a highly discounted price. sqlmaestros.co...
    The bundled content focuses on internals, troubleshooting, query tuning, performance optimization, tips, tricks, and loads of content from the real world.
    If you are a fan of live classes, you can explore the SQL Server Performance Tuning Master Class. 40 hours of deep-dive LIVE training. Attend LIVE & get the class recordings for a lifetime. sqlmaestros.co...

Комментарии • 41

  • @tinavanrikxoord9955
    @tinavanrikxoord9955 2 года назад +1

    Excellent instruction. Thank you.

  • @shatabdidey3056
    @shatabdidey3056 4 года назад

    So this was the best vedio I have seen so far in SQL Administration..hoping to learn much more

  • @ramyanagashree
    @ramyanagashree 5 лет назад +19

    OK, we got to know which query is waiting. But the query which is waiting is not the real culprit. How to find the query which made that Select query to wait?

    • @itintegration1734
      @itintegration1734 3 года назад

      It is the transaction query within the update statement that block the server's ressources. Until it release the resources the sql select statement will wait for the end of the transaction statement :)

    • @danezubro
      @danezubro 3 года назад +3

      @@itintegration1734 And if it's was 100 transactions ? Which query is waiting ?

  • @imcsingapore7215
    @imcsingapore7215 4 года назад +2

    awesome. would like to see now, how will you going to optimize the query statement itself. thanks

  • @ademolasanni4443
    @ademolasanni4443 4 месяца назад

    That's a good demo. So after capturing the wait type what next? Becos seeing the issue causing the slowness is good how to deal with it also matter. Thanks

  • @RamSaun
    @RamSaun 3 года назад +2

    Guys I have a question - In this case we all knew there was another update query running on another window and when we rollback that tran we could then see the logs of extended events
    But what if some tran is in progress and executed by another user and we don't know who is running that tran and unless and until that tran is completed or rolled back we would not see any logs.
    What to do in this scenario ? @SQLMaestros

  • @kotekr4383
    @kotekr4383 3 года назад

    Excellent Bansal

  • @zohebkhan9066
    @zohebkhan9066 4 года назад +1

    Awesome sir, Very helpful

  • @brad_mcallister
    @brad_mcallister 3 года назад

    I just learned a thing or two, thx

  • @amitkumarsharma25
    @amitkumarsharma25 6 лет назад +2

    Hi Amit,
    If we talk about the same in two sp's then after identifying the LCKMS lock on query. How would we able to know which stored procedure is blocking our query.

  • @maaz77muslimKarachi
    @maaz77muslimKarachi 4 года назад

    really helpful video sofar, if anyone would help me out to lear the SQL dba spacially, it would be appreciated.

  • @theRevelationsurah
    @theRevelationsurah 6 лет назад

    Really very helpful and well explained

  • @israel1919
    @israel1919 4 года назад

    Thanks a lot for the help.

  • @purushotambhardwaj
    @purushotambhardwaj 5 лет назад

    Excellent explaination
    Thank You !!

  • @fbifido2
    @fbifido2 2 года назад

    if you have a database running in production, how would you know what session to filter on ?

  • @AliciaMarkoe
    @AliciaMarkoe 4 года назад

    Excellent, thank you so much!

  • @u2lover10
    @u2lover10 5 лет назад

    Excellent Video !

  • @madanagrawal1465
    @madanagrawal1465 5 лет назад

    Very good article

  • @k-fo9pq
    @k-fo9pq 6 лет назад +1

    we mostly have slow running queries issues in prod..for which i dont have access. So do i need to check with DBA for this?

  • @banisabrown143
    @banisabrown143 6 лет назад

    Brilliant content! Very helpful!

  • @kholekunal
    @kholekunal 5 лет назад

    Good video.. helpful

  • @lehuyluyen
    @lehuyluyen 6 лет назад

    very useful

  • @sakauk7566
    @sakauk7566 5 лет назад

    Hi Amit, I have created 2 XEvents on my server to track any deadlocks or long running quires (Longer than 2 minutes), they worked very well but i had major performance degradation on the server knowing that i didnt pick any global events. I had to stop those events and the performance picked back to normal. Any clues on what has gone wrong? Im sure XEvents supposed to be much better and less consuming than profiler.

  • @Subba_Chems
    @Subba_Chems 3 года назад

    can we use DBCC OpenTran?

  • @labonka
    @labonka 4 года назад

    Easier to check blocking session in sysprocess

  • @muhammadafzal237
    @muhammadafzal237 2 года назад

    It was very complex

  • @danezubro
    @danezubro 3 года назад

    Very correct but incomplete. We know it's blocked, but we don't know who's blocking it.

  • @contactsan12
    @contactsan12 3 года назад

    everything is cool but wy are you wearing the headphones ??

  • @muhammadumair5019
    @muhammadumair5019 3 года назад

    Whats the solution?

  • @shivendrakumaryadav5811
    @shivendrakumaryadav5811 6 лет назад

    Super like :)

  • @mohammadhoque51
    @mohammadhoque51 5 лет назад

    Wondefull. Learn something

  • @sucharitha9365
    @sucharitha9365 5 лет назад

    i am trying join in your website but i didn't find out math Captcha

  • @ayubkarem8697
    @ayubkarem8697 6 лет назад

    Hi Bansal
    i have installed SQL server 2012 Express ,and i created table with 5000,000 Records ,but its performance execution is too slow
    what should i do with it?
    many thanks for replay

    • @RameshBabusql
      @RameshBabusql 6 лет назад

      ayub Karem
      SQL Server Express Edition uses 1 processor and 1 GB RAM .

    • @tamito9298
      @tamito9298 6 лет назад

      Create necessary indexes for Your table depends on needs (I don`t know what the phrase "performance execution is too slow" - may be it means only ""Select * from Table"..

    • @pramodmaurya6610
      @pramodmaurya6610 2 года назад

      Thanks for your efforts and knowledge sharing.. thanks

  • @scotthartman8390
    @scotthartman8390 6 лет назад

    oh ... he's saying SPID!!! OK, I un-disliked this video... sorry, I've always heard ESS PEE EYE DEE, not "SPID"... cool cool!

  • @tamito9298
    @tamito9298 6 лет назад

    Excellent explaination
    Thank You !!!