Several settings can be tuned to improve the performance of aggregates in ParadeDB.

Configure Parallel Workers

ParadeDB uses Postgres parallel workers. By default, Postgres allows two workers per parallel query. Increasing the number of parallel workers allows parallel queries to use all of the available hardware on the host machine and can deliver significant speedups.

Run VACUUM

VACUUM updates the table’s visibility map, which speeds up Postgres’ visibility checks.
VACUUM mock_items;
If the table experiences frequent updates, we recommend configuring autovacuum.

Run pg_prewarm

The pg_prewarm extension can be used to preload data from the index into the Postgres buffer cache, which improves the response times of “cold” queries (i.e. the first search query after Postgres has restarted).
CREATE EXTENSION pg_prewarm;
SELECT pg_prewarm('search_idx');