Skip to main content

LOCAL Resegment Global Resegment

  • January 21, 2016
  • 2 replies
  • 12 views

SRA1
Forum|alt.badge.img+1
  • Participating Frequently

In my Explain plan , I got this message.

COuld someone explain the meaning of this line.

 

| | | | | | | | | +---> GROUPBY HASH (SORT OUTPUT) (GLOBAL RESEGMENT GROUPS) (LOCAL RESEGMENT GROUPS) [Cost: 713K, Rows: 5M] (PATH ID: 9)

2 replies

MichaelL
  • New Participant
  • January 21, 2016

That represents a part of the access path for the query where a group by is being executed.

 

GROUPBY HASH indicates it will use a hash algorithm to perform the grouping - a hash table will be made with one entry for each group. This is used when the input is not sorted.

 

SORT OUTPUT indicates, unsurprisingly, that the output of this stage will be sorted.

 

GLOBAL RESEGMENT GROUPS means that, prior to beginning to accumulate aggregates (e.g. SUM, MIN, MAX) the data will be resegmented across the cluster by the grouping key. That means that there will be Send/Receive steps in the plan associated with this path.

 

LOCAL RESEGMENT GROUPS means that it will be resegmented on each node as well. Sometimes this is not necessary as the data is already segmented according to the grouping key.

 

I hope that helps.


eli_revach
Forum|alt.badge.img+2
  • Participating Frequently
  • January 21, 2016