SQL Server Execution Plan Basics

Поделиться
HTML-код
  • Опубликовано: 3 авг 2024
  • Follow up to this video: • Index and Execution Pl...
    This channel is dedicated to New and Accidental SQL Server DBAs!
    www.DallasDBAs.com/blog for more stuff
    Part-time DBAs: dallasdbas.com/services/
  • НаукаНаука

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

  • @USA_to_Asia_in_2024
    @USA_to_Asia_in_2024 Месяц назад +1

    This is Pure Gold (as Manosphere Highlights Daily channel would say).

    • @Kevin3NF
      @Kevin3NF  Месяц назад

      Hope it helps you :)

  • @shilk4301
    @shilk4301 2 года назад +2

    This is the best video I have seen . Easy to understand . Just started to learn and was lost . This helped me a lot . Thank you 🙏

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

      You're very welcome!

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

    Many thanks for posting. Surprised the likes and views are so low but for me it's been very useful .

  • @steveabba8463
    @steveabba8463 2 года назад +2

    Thanks Kevin for the simplicity and examples!!!

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

      You're very welcome!

  • @isaguclu941
    @isaguclu941 4 года назад +4

    The best explanation I have seen! I can't thank you enough for it.

  • @ManishChopra
    @ManishChopra 5 лет назад +3

    Right to left and from top to bottom.
    Thanks kevin!

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

    wow, you explained everything i was looking for a while , Thanks a lot

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

      Glad it was helpful!

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

    You are awesome!!! looking for this from a long time.. Simple and Great explanation

  • @brunovecchietti
    @brunovecchietti 3 года назад +1

    Finally I understood execution plans. Thanks!

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

      Great to hear!
      That barely scratched the surface...this is everything:
      www.red-gate.com/simple-talk/books/sql-server-execution-plans-third-edition-by-grant-fritchey/

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

    Very clearly put, thanks. Looking for more of your examples and explanations

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

    Great example with clear explanation. Definitely a subscribe!

  • @user-uf9fj9or6w
    @user-uf9fj9or6w 4 месяца назад +1

    omg you saved my energy and everything thanks alot

    • @Kevin3NF
      @Kevin3NF  2 месяца назад

      Glad it helped!

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

    Thank you for the good explanation and the examples!

  • @JaswantSingh-di8nu
    @JaswantSingh-di8nu 3 года назад +2

    Very well explained with examples. Thank you, Kevin!

  • @simusprime
    @simusprime 5 лет назад +2

    This is exactly what I have been working on the last 2 weeks! Nice breakdown!

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

      Working on such a video, or learning to read Plans?

    • @simusprime
      @simusprime 5 лет назад +1

      @@Kevin3NF Im going through our software and optimizing queries. Especially missing indexes.

    • @Kevin3NF
      @Kevin3NF  5 лет назад +1

      @@simusprime Awesome! Good luck...and don't over-index! Run an "Unused Index" query as well to look for possible dead weight.

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

    Well done, I actually learned something!

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

    This is very helpful, Thank you.

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

    great stuff, thanks Kev!

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

    Very nicely explained, thanks.

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

    Well done, very clear explanation

  • @tonycovarrubias5931
    @tonycovarrubias5931 5 лет назад +1

    This is exactly what I was looking for.

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

      Awesome! You should get Grant Fritchey's newest edition of his query plan book...

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

    Thank you. Good Job.

  • @MasterBeastieshow
    @MasterBeastieshow 5 лет назад +1

    Kevin Good job. Please upload more videos

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

    Awesome video.

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

    Thanks sir, I'm from India

  • @ashwinghorpade5917
    @ashwinghorpade5917 5 лет назад +1

    best explanation

  • @selvamkumar1982
    @selvamkumar1982 5 лет назад +2

    Thanks Kevin... Can u post performance tuning in wild card searches....

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

    Good explanation..thanks

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

      Glad you liked it

  • @tabs5375
    @tabs5375 5 лет назад +1

    Brilliant video :) Quick question, what would be the best way to optimise a query that uses wildcards? E.g. select * from table where name like 'Kevin%';
    Would you have to reevaluate the query to see if bringing back all the Kevins is the right approach?

    • @Kevin3NF
      @Kevin3NF  5 лет назад +2

      Thanks Ryan! You would want a non-clustered index on [name] for a 'Kevin%'...and you might see an index scan instead of a seek, depending on how many variations of Kevin there are. If you try '%Kevin%', your index will no be used. That leading wildcard changes everything. Always test and evaluate periodically. Missing and Unused index queries are my favorite ways to evaluate my index strategy

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

    Excellent Explanation.
    What if there is no clustered index or Primary column. Will it cost more to search another column which is LastAccessDate which is not included in the non clustered index and also query uses non clustered index and is it look for look up column by that time ?

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

      No Clustered Index makes the table a HEAP, which will almost always be harder to search for extra columns that are not in the NC index it is using now.
      www.brentozar.com/blitz/heaps-tables-without-primary-key-clustered-index/

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

      Thank you Kevin for your valuable time.

  • @Akshay-Raut
    @Akshay-Raut 4 года назад +1

    Are the cost of each operation accumulated from right to left or are they independent ?

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

      Each operator has its own cost, and the entire query is shown as a cost in the query stats DMVs:
      www.scarydba.com/2017/02/20/estimated-costs-queries/

  • @Jerry-zf3cn
    @Jerry-zf3cn 5 лет назад +2

    Would have been more helpful to put that link to your other video in your summary where it could have been clickable...

    • @Kevin3NF
      @Kevin3NF  5 лет назад +1

      Thanks Jerry...I have added the link to the description of this one

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

    if cost =20% for stored proedure this good or not

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

      There is no way to tell...it totally depends on what the procedure is doing, and how the Query Optimizer decide it is going to execute the code in the proc, get the data, allocate memory, etc.

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

      @@Kevin3NF i mean excution plan the estimaton cost is 20%

  • @AAA-pt7ix
    @AAA-pt7ix 4 года назад

    hi

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

    10:27