Postgres Join Strategies - Nested Loop Join, Hash Join, Merge Join

Sdílet
Vložit
  • čas přidán 6. 06. 2021
  • In this video, I share with you how Postgres Join strategies work. I will explain in details step by step how these 3 join algorithms operate: Nested Loop Join, Hash Join and Merge Join.
    #postgres #queryplan #liftandshiftdev #postgresql #backend #database #sql #joinstrategies #mergejoin #hashjoin #nestedloopjoin
    Medium blog: / postgresql-join-strate...
    Support the channel: paypal.me/liftandshiftdev
  • Věda a technologie

Komentáře • 6

  • @lotsa2000
    @lotsa2000 Před 2 lety +11

    Isn't the merge join at the end incorrect since the second set wasn't sorted first? From what I'm seeing, merge join requires both sets to be sorted first.

  • @thinethnadarajah7299
    @thinethnadarajah7299 Před 2 lety +8

    Merge join explaination is wrong. Second ist has to be sorted

  • @VictorLima-xv3rq
    @VictorLima-xv3rq Před 2 lety +1

    Very easy to understand, thank u a lot

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

    In the merge join, you did not pick/match employe id 4. Why you are not considering that record. as per condition it should be part of the result. Can you please update on this?

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

      For that, you have to create pre-sorted index in the salary table. In this case, Merge Join will go through all values in salary table, but in the sorted way.