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

Sdílet
Vložit
  • čas přidán 21. 11. 2017
  • 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.com/all-in-one-bu...
    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.com/sql-server-wo...
  • Věda a technologie

Komentáře • 41

  • @banisabrown143
    @banisabrown143 Před 6 lety

    Brilliant content! Very helpful!

  • @purushotambhardwaj
    @purushotambhardwaj Před 5 lety

    Excellent explaination
    Thank You !!

  • @shatabdidey3056
    @shatabdidey3056 Před 4 lety

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

  • @AliciaMarkoe
    @AliciaMarkoe Před 4 lety

    Excellent, thank you so much!

  • @theRevelationsurah
    @theRevelationsurah Před 6 lety

    Really very helpful and well explained

  • @tinavanrikxoord9955
    @tinavanrikxoord9955 Před 2 lety +1

    Excellent instruction. Thank you.

  • @u2lover10
    @u2lover10 Před 5 lety

    Excellent Video !

  • @israel1919
    @israel1919 Před 4 lety

    Thanks a lot for the help.

  • @imcsingapore7215
    @imcsingapore7215 Před 4 lety +2

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

  • @zohebkhan9066
    @zohebkhan9066 Před 4 lety +1

    Awesome sir, Very helpful

  • @madanagrawal1465
    @madanagrawal1465 Před 5 lety

    Very good article

  • @kholekunal
    @kholekunal Před 4 lety

    Good video.. helpful

  • @lehuyluyen
    @lehuyluyen Před 6 lety

    very useful

  • @amitkumarsharma25
    @amitkumarsharma25 Před 5 lety +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.

  • @kotekr4383
    @kotekr4383 Před 3 lety

    Excellent Bansal

  • @k-fo9pq
    @k-fo9pq Před 6 lety +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?

  • @shivendrakumaryadav5811

    Super like :)

  • @brad_mcallister
    @brad_mcallister Před 2 lety

    I just learned a thing or two, thx

  • @ramyanagashree
    @ramyanagashree Před 5 lety +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 Před 3 lety

      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 Před 3 lety +3

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

  • @maaz77muslimKarachi
    @maaz77muslimKarachi Před 3 lety

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

  • @RamSaun
    @RamSaun Před 3 lety +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

  • @sakauk7566
    @sakauk7566 Před 5 lety

    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.

  • @ademolasanni4443
    @ademolasanni4443 Před 3 měsíci

    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

  • @fbifido2
    @fbifido2 Před 2 lety

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

  • @Subba_Chems
    @Subba_Chems Před 3 lety

    can we use DBCC OpenTran?

  • @labonka
    @labonka Před 4 lety

    Easier to check blocking session in sysprocess

  • @danezubro
    @danezubro Před 3 lety

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

  • @muhammadafzal237
    @muhammadafzal237 Před 2 lety

    It was very complex

  • @muhammadumair5019
    @muhammadumair5019 Před 3 lety

    Whats the solution?

  • @contactsan12
    @contactsan12 Před 2 lety

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

  • @mohammadhoque51
    @mohammadhoque51 Před 5 lety

    Wondefull. Learn something

  • @sucharitha9365
    @sucharitha9365 Před 5 lety

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

  • @ayubkarem8697
    @ayubkarem8697 Před 6 lety

    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 Před 6 lety

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

    • @tamito9298
      @tamito9298 Před 6 lety

      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 Před 2 lety

      Thanks for your efforts and knowledge sharing.. thanks

  • @scotthartman8390
    @scotthartman8390 Před 5 lety

    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 Před 6 lety

    Excellent explaination
    Thank You !!!