LOCAL Resegment Global Resegment
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)
0
Comments
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.
Hi ,
I think the attach is good refeence for you to start with .
https://my.vertica.com/docs/7.1.x/HTML/Content/Authoring/AnalyzingData/Optimizations/AvoidingResegmentationDuringGROUPBYOptimizationWithProjectionDesign.htm
Thanks