SQL Server Query Tuning Best Practices - Part 1

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • SQL Server MVPs Aaron Bertrand and Kevin Kline begin their series on query tuning best practices. They go over some tips and tricks for writing queries. First, Kevin goes over query tuning methodology and what is needed to measure query performance. Then, Aaron discusses Default Cursors, Correlated Sub-Queries, and Not In.
    Find more information about our products:
    Plan Explorer: www.sqlsentry.com/plan-explorer
  • Věda a technologie

Komentáře • 23

  • @ArshakNorsoyan
    @ArshakNorsoyan Před 9 lety +1

    You, Guys are just awesome. This is so useful. Thank you so much to share this video! .

  • @fUjiMaNia
    @fUjiMaNia Před 9 lety +2

    good stuff and thanks for the upload

  • @briangalebmg002
    @briangalebmg002 Před 9 lety +1

    very good video. Learned a lot about queries. I know where I work, cursors are used. The majority of the time, I think that they are being used properly, but from my testing, I find that storing stuff in temp tables is faster than a cursor. With SSIS though, sometimes that isn't a good or valid option.
    Definitely going to be grabbing the tools you mentioned. The timing couldn't be better. We have recently had a few queries eating up a lot of CPU and/or high number of waiting tasks and high number of batch requests per second (IIRC, it got up to 250 today). Watching the activity monitor, it got filled with cursors.
    So I'd like to run your tool against one of our test DB's and see what it tells me.

  • @deniscloutier383
    @deniscloutier383 Před rokem

    Great video, thanks

  • @shanem6891
    @shanem6891 Před 8 lety +1

    A great resource for the community to share. As a small contribution CXPACKET stands for class (as in C++ class) exchange packet and not context extension packet as mentioned at 20:11.

    • @kevinkline2392
      @kevinkline2392 Před 5 lety

      Thanks Shane for the kind words and thanks for the catch!

  • @JaiVikasSingh
    @JaiVikasSingh Před 9 lety +2

    thanks for the demo...

  • @Joe_DeSantis
    @Joe_DeSantis Před 8 lety +1

    @SQLSentry is there a link to where I can find the queries used in the first 30 minutes of the presentation?

    • @ritvikshandilya
      @ritvikshandilya Před 7 lety +2

      Check out my new video about sql query tuning in 15 mins.

    • @mauroldanr
      @mauroldanr Před 7 lety

      sorry, but I cannot find that video. could you link it? thanks

    • @kevinkline2392
      @kevinkline2392 Před 5 lety

      There are matching blog posts on sqlperformance.com for each of the techniques described in the video. The full scripts are available there.

  • @arunkumarg21
    @arunkumarg21 Před 9 lety +1

    Thanks kevin and aaron may i know where can i get sqlsentry sample database pls help me

    • @kevinkline2392
      @kevinkline2392 Před 5 lety

      There is not a specific database, aside from the normal AdventureWorks database available on Github, for the general demos. The code that you're looking for are available in matching blog posts on sqlperformance.com for each of the techniques described in the video. The full scripts are available there.

  • @krunalshah351
    @krunalshah351 Před 5 lety +1

    last ports are goood

  • @vukovicmario
    @vukovicmario Před 8 lety +1

    Interview with Greg Gonzalez, President and CEO of SQL Sentry: www.superbcrew.com/sql-sentry-helps-companies-improve-the-performance-of-ms-sql-server-environments/

  • @sid5201
    @sid5201 Před 7 lety +1

    So we can use Wait stats in Production?

    • @kevinkline2392
      @kevinkline2392 Před 5 lety

      Yes, absolutely, for troubleshooting and performance tuning.

  • @rethabileize
    @rethabileize Před 2 lety

    very usefull

  • @elenelenaelena8846
    @elenelenaelena8846 Před 8 lety +21

    first 7 min 15 sec - empty bla- bla- bla

    • @kevinkline2392
      @kevinkline2392 Před 5 lety

      TANSTAAFL, as they say. The real content starts afterwards.

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

    clearly not done by someone who knows how to keep the watcher hooked. so much talk omg

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

    Lots of talking less learning

  • @skhochay
    @skhochay Před 4 lety

    very very BAD analysis