3 ms·
From a Vertica query plan: explain select country, count(*) from tablename group by 1 ... +-GROUPBY PIPELINED (GLOBAL RESEGMENT GROUPS) [Cost: 79,
by kwillets 8y ago
From a Vertica query plan:
explain select country, count(*) from tablename group by 1
...
+-GROUPBY PIPELINED (GLOBAL RESEGMENT GROUPS) [Cost: 79, Rows: 1] (PATH ID: 1)
| Aggregates: count(*)
| Group By: tablename.country
| Execute on: All Nodes
| +---> STORAGE ACCESS for tablename [Cost: 78, Rows: 14M (1 RLE)] (PATH ID: 2)
...
Note the row count at the top level.
This type of thing only works when the group column is the first in the projection sort order (or for multiple columns, a prefix of it). Generally GROUPBY PIPELINED indicates that the sort order is being used (including RLE).