mock_items
table by rating
, and calculates the number of items for each unique rating
.
Ordering by
COUNT
is not yet supported — queries that do so will not be
optimized.All fields in the
GROUP BY
and ORDER BY
clauses, in this case rating
,
must be indexed as fast.LIMIT
to the GROUP BY
. Terms aggregations without a LIMIT
consume more memory and
are slower to execute. If a query does not have a limit and more than 65000
unique values are found in a field, an error will be returned.
To verify that a terms aggregation was pushed down, look for a ParadeDB Aggregate Scan
with terms
in the EXPLAIN
output:
Expected Response