Options

What's the meaning of LOCAL ROUND ROBIN in the execution plan?

I saw a join plan as below. I know the meaning of resegment of outer/inner, but what's LOCAL ROUND ROBIN).

| | +---> JOIN HASH [Cost: 2B, Rows: 2B] (PATH ID: 4) Outer (RESEGMENT)(LOCAL ROUND ROBIN) Inner (RESEGMENT)

Best Answer

  • Options
    Sergey_Cherepan_1Sergey_Cherepan_1 ✭✭✭
    Answer ✓

    Without local resegment, it will be single threaded per node. You can look in execution_engine_profiles. Each instance of operator will publish set of counters. For example "execution time (us)" is published by pretty much every instance of any operator. You will see this counter published only once per node, indicating single instance of operator, means single thread.

Answers

  • Options

    When you need more than one thread per node, after global resegment optimiser can do local resegment or local round robin.
    Local round robin is used when optimiser decided that local resegment will work poorly due to low cardinality of join key. Then inner row source is not being locally resegmented, and outer row source is divided between threads using round robin.

  • Options

    Great, thx. if there is no local related info, then the join is done in a single thread on a node? e.g
    | +---> JOIN HASH [FullOuter] [Cost: 3B, Rows: 26 (PREDICATE VALUE OUT-OF-RANGE)] (PATH ID: 4) Outer (RESEGMENT) Inner (RESEGMENT)

  • Options

    And the following one even doesn't have inner part, but only outer part, what does this mean?
    | | | +---> JOIN HASH [FullOuter] [Cost: 2B, Rows: 1 (PREDICATE VALUE OUT-OF-RANGE)] (PATH ID: 14) Outer (RESEGMENT)

  • Options

    thx for your input

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file