GBYTYPE

Specifies which algorithm—GROUPBY HASH or GROUPBY PIPELINED—the Vertica query optimizer should use to implement a GROUP BY clause. If both algorithms are valid for this query, the query optimizer chooses the specified algorithm over the algorithm that the query optimizer might otherwise choose in its query plan.

Syntax

GROUP BY /*+GBYTYPE( HASH | PIPE )*/

Arguments

HASH | PIPE

Specifies the GROUP BY algorithm to use:

  • HASH: GROUPBY HASH algorithm
  • PIPE: GROUPBY PIPELINED algorithm

Vertica uses the GROUPBY PIPELINED algorithm only if the query and one of its projections comply with GROUP BY PIPELINED requirements. Otherwise, Vertica issues a warning and uses GROUPBY HASH.

For more information about both algorithms, see GROUP BY Implementation Options.

Examples

See Controlling GROUPBY Algorithm Choice in Analyzing Data.