12 Ways To Rewrite SQL Queries for Better Performance

Поделиться
HTML-код
  • Опубликовано: 4 авг 2024
  • In this episode we explore a variety of ideas for rewriting queries to improve performance when you can't do things like change server settings or modify indexes.
    Subscribe and turn on notifications to never miss a weekly video: ruclips.net/user/DataWithBer...
    Read the full post with examples:
    bertwagner.com/2019/05/28/12-...
    Follow me on Twitter:
    / bertwagner
  • НаукаНаука

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

  • @tharun3766
    @tharun3766 3 года назад +25

    4:19 Forcing Join Orders
    4:38 Inline UDFs
    5:02 Creating UDFs for Serialization
    5:34 NOT IN vs NOT EXISTS
    5:54 Data Compression
    6:24 Materialized Views
    6:48 Cordiality Estimator Hinting
    7:30 Copy the data elsewhere

  • @notsonathan
    @notsonathan 4 года назад +111

    I wish you showed some example, kinda hard to understand for a beginner. But great video! Very informative

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

      He covered some of those examples in his previous videos. Check them out :)

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

      He linked the full article with examples in the bio: bertwagner.com/posts/12-ways-to-rewrite-sql-queries-for-better-performance/

  • @shivamchauhan2940
    @shivamchauhan2940 4 года назад +162

    Tutorial starts at 1:51

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

      i dont mean to be so off topic but does anyone know a tool to get back into an Instagram account..?
      I was stupid forgot my account password. I would love any tricks you can give me.

  • @sql3051
    @sql3051 5 лет назад +6

    Bert, Congratulations on hitting 2000 subscribers. Always great useful information. Keep it coming, we really enjoy it.

  • @ashleyli1879
    @ashleyli1879 4 года назад +10

    Thank you so much for sharing! Would be nice to see some examples though. I am a data analyst myself and it's hard to find easy-to-understand and useful content like this online. Please keep up with the great work and looking forward to see more quality contents! :)

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

    Thank you! It is so smooth and useful. From my experience SQL Server 2016 and newer is just using a derived table in the plan no matter what is in a query text.

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

    #8 was probably RBAR vs Set statements - Rookie performance mistake :-)
    Congrats on 2000+ people whom you have helped!!! You don't always know how far the ripples in a pond go when you drop the stone in!! Keep on dropping knowledge on us, sir!!

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

    Really precise to the point yet short video, summarizing all the important topics. For those guys who gave the thumbs down (so UNFARE), you should get SQL 101 series from some other youtubes (tons of them available), before your comments. This video is the best length and quality for such condensed topic. Worth viewing 20 times and more. Also the examples are nicely laid out in the blog (for those who read), in depth. For any developers or even casual SQL users, please read besides watch RUclips. If examples are included in this video, then it would be a video for 2 hours, then many other people will complain (about its excessive length), then comments would have been: please take those boring examples out from the video. This video is a summary for experienced SQL users. I have found it the best so far, among the 200 other videos that came out from my search engine. 5 star video!

    • @pratyushkumar6319
      @pratyushkumar6319 Год назад

      The video is informative but much help for a beginner. He definitely need to elaborate those pointes more. If we wanted to read his blog why would we watching youtube video instead.
      I appreciate his effort but he could have been a but more verbose and better.

  • @MrJrhzues
    @MrJrhzues 8 месяцев назад

    You're new I'm just starting this video... I'm gonna watch this..

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

    Well resumed!

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

    instant sub :: Thank you for making this

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

    Very very very usefull. Thank you!

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

    What’s the diff between copy data and materialized views?

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

    Good work, brother!

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

    really a great video

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

    Thank you hey but had to go online for examples,can you please include those in your next videos 😊😊

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

    congratulations on your 2000, keep it up, you deserve more definitely. When it comes to employment in database field, what would be salary that someone would ask for with your amount of knowledge. I know that I don't know as much as you do but just for a guideline

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

    good work

  • @pioleonardo
    @pioleonardo Год назад

    Hi, how can you identify slow-running queries? is there a tool to pinpoint slow-running queries? like, I have a long query with CTE, JOINS, and subqueries. How can the plan or a tool identify which query runs slow? Thank you!🤓

    • @atchuthsurisetti2484
      @atchuthsurisetti2484 Год назад

      Hi Leeyo , did you find any solution
      , I had that trouble following me to the view.

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

    Usually when I revisit a query I wrote months ago I can do better

  • @data9051
    @data9051 Год назад

    this is pretty high level. The info in here is like expert/advanced. Will have to revisit this vid and your blog post later on when I am ready to start utilizing these strategies. Thanks so much.

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

    No examples?

  • @Indian-no2rr
    @Indian-no2rr 3 года назад

    Please execute some examples in ur video

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

    looks like frankie muniz

  • @user-s5f
    @user-s5f Год назад +1

    Why not add examples? Why should I watch on you?

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

    Just talk ..and talk..and talk...

  • @Helloimtheshiieet
    @Helloimtheshiieet Год назад

    this makes no sense swapped off video comparing IN to UNION ALL .. literterally not even comparable at all

  • @johnmorsley
    @johnmorsley Год назад

    Music - Too distracting for me = dislike

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

    and here I am having cmd.ExecuteNonQuery(); ERROR 😂
    #BEGINNER