14.416 Sort-Merge Join, Co-Grouping

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ธ.ค. 2024

ความคิดเห็น • 29

  • @jessiema9477
    @jessiema9477 10 ปีที่แล้ว +1

    I mainly looked at the logical part before 6:40. Very clear and useful. Thanks for sharing.

    • @jensdit
      @jensdit  10 ปีที่แล้ว

      thanks!

  • @csprogrammer6945
    @csprogrammer6945 8 ปีที่แล้ว +3

    excellent video, thanks .. I have a question if the sorting takes O(n log n), then how many I/Os are needed for the sort-merge join? how does buffering help in improving performance?

    • @OmidghTV2000
      @OmidghTV2000 4 ปีที่แล้ว

      this is a good question. did you figure out the answer?

  • @mobilemon5032
    @mobilemon5032 10 ปีที่แล้ว

    Excellent video! Would be great if you talked more about the time complexity of the merge sort join O(nLogn), particularly why its O(nLogn)

    • @jensdit
      @jensdit  10 ปีที่แล้ว +1

      Thanks! O(n log n) is due tothe assumption that (main-memory) sorting has that complexity, the actual merge is only O(n). So for the relational sort-merge join shown in this video the runtime complexity mostly depends on the complexity of the sorting method used. However, the overall complexity changes if you use a different sorting algorithm which has a runtime complexity different from O(n log n). In addition, the complexity of sort-merge join may change as well if this algorithm is generalized to use more complex "sweep lines" (maybe I do a video on this one day). O-Notation has additional problems for performance measurements in data management which I explain in this video: watch?v=9M2ErfVimJo

    • @LordDarthNihilus
      @LordDarthNihilus 9 ปีที่แล้ว

      +Jens Dittrich Is the complexity with CoGroups (Having no keys) also O(n*log(n)) or will the grouping itself increase the complexity?

    • @venkatk284
      @venkatk284 6 ปีที่แล้ว

      Excellent Video.. very useful

  • @dglaurung6186
    @dglaurung6186 8 ปีที่แล้ว

    Hi Jens,
    Thanks you very much for your lectures. I have bought the electronic version of your 'Patterns in Data Management' book. Is it possible to access Labs, mentioned both in the Book and youtube lectures?
    For me, this is the only thing that I am lacking in your wonderful course.
    Thanks.

  • @immanuelhaffner6915
    @immanuelhaffner6915 9 ปีที่แล้ว

    I think there is a small bug in the pseudo code at 10:00 . If PR.x == PS.x, we output. Then, the PX.x PS.x AND PS.x == (PS + 1).x ? Or in other words: in PS we would see the same value in the next row, but in PR the next row has a larger value.Then we should have incremented PS, but not PR.
    My proprosed fix can be found at pastebin.com/BnHmzt0P . The idea is to have a 1-lookahead into either of the columns.

    • @jensdit
      @jensdit  9 ปีที่แล้ว +2

      +Immanuel Haffner Yes, with a lookahead you could fix this problem as well. I discuss this problem of this sort-merge implementation in 10:25. For a normal equi-join along foreign key constraints, this issue simply shouldn't happen as long as you alyways move the foreign key column (the one having duplicates) first.

    • @immanuelhaffner6915
      @immanuelhaffner6915 9 ปีที่แล้ว

      +Jens Dittrich that makes sense. thank you.

  • @mihiranpriyanja1460
    @mihiranpriyanja1460 5 ปีที่แล้ว

    What if cityId is not an number value? How to determine (PR.x

    • @NoelyeuMila
      @NoelyeuMila 3 ปีที่แล้ว

      a bit late but for the 'key' column to be sorted, it must be a comparable value. The details of the comparison is dependent on the data type.

  • @aparnajoshi2433
    @aparnajoshi2433 4 ปีที่แล้ว

    Best explanation ever. Thank you

  • @adlermuller1386
    @adlermuller1386 4 ปีที่แล้ว

    Fehlt da nicht ein PR++ unter dem output?
    Sprich müsste es nicht so sein:
    if PR.x == PS.x:
    output ((PR, PS));
    PR++;

    • @jensdit
      @jensdit  4 ปีที่แล้ว +1

      nee, da steht kein "else": das if in der nächsten Zeile "if PR.x

    • @adlermuller1386
      @adlermuller1386 4 ปีที่แล้ว

      @@jensdit Ah okay, danke :)

  • @mrugrajkumpavat1781
    @mrugrajkumpavat1781 4 ปีที่แล้ว

    Thank you🌹😊

  • @refiperetz8542
    @refiperetz8542 9 ปีที่แล้ว

    Great video helped me a lot, the accent and the hand writing was a bit rough on me since English is not my native language .

  • @АндрейБашук-ч3э
    @АндрейБашук-ч3э ปีที่แล้ว

    awesome lessons.

  • @enriquezmelissa2166
    @enriquezmelissa2166 8 ปีที่แล้ว +1

    THANK YOU SO MUCH. It was truly helpful.

  • @curlyhairgirl633
    @curlyhairgirl633 3 ปีที่แล้ว

    Very good explanation!!! Thank you!

  • @asefsgrd5573
    @asefsgrd5573 4 ปีที่แล้ว

    PERFECT ANIMATION!!!

  • @ValterPatrick
    @ValterPatrick 10 ปีที่แล้ว

    Obrigado, este video foi muito instrutivo para mim, vai me ajudar bastante em meu projeto interdisciplinar.

  • @mikhailandreev1595
    @mikhailandreev1595 3 ปีที่แล้ว

    Quality content

  • @obelix_gaul
    @obelix_gaul 9 ปีที่แล้ว

    excellent video..

    • @jensdit
      @jensdit  9 ปีที่แล้ว

      +Madhu Kashyap thanks!

  • @SuperSpawn1995
    @SuperSpawn1995 7 ปีที่แล้ว

    eyvallah hacı