Skip to main content
Question

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

  • September 12, 2023
  • 5 replies
  • 3 views

qihua_wu
Forum|alt.badge.img+1

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)

5 replies

Sergey_Cherepan_1
Forum|alt.badge.img+2

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.


qihua_wu
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • September 13, 2023

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)


qihua_wu
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • September 13, 2023

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)


Sergey_Cherepan_1
Forum|alt.badge.img+2

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.


qihua_wu
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • September 14, 2023

thx for your input