Skip to main content

ParadeDB Operator

In order for ParadeDB to push down an aggregate, a ParadeDB text search operator must be present in the query.
-- Not pushed down
SELECT COUNT(*) FROM mock_items
WHERE rating = 5;

-- Pushed down
SELECT COUNT(*) FROM mock_items
WHERE rating = 5
AND id @@@ pdb.all();
If your query does not contain a ParadeDB operator, a way to “force” aggregate pushdown is to append the all query to the query’s WHERE clause.

Join Support

ParadeDB is currently only able to push down aggregates over a single table. JOINs are not yet pushed down but are on the roadmap.

NUMERIC Columns

NUMERIC columns do not support aggregate pushdown. Queries with aggregates on NUMERIC columns will automatically fall back to PostgreSQL for aggregation. For numeric data that requires aggregate pushdown, use FLOAT or DOUBLE PRECISION instead:
-- Aggregates can be pushed down
CREATE TABLE products (
    id SERIAL PRIMARY KEY,
    price DOUBLE PRECISION
);

-- Aggregates fall back to PostgreSQL
CREATE TABLE products (
    id SERIAL PRIMARY KEY,
    price NUMERIC(10,2)
);
Filter pushdown (equality and range queries) is fully supported for all NUMERIC columns. Only aggregate pushdown is not supported.