kimo
DefinitionAll productsData

Query pushdown

Definition

Query pushdown is an optimization in which a query engine sends filters, column selections, aggregations, joins or limits down to the source system to execute there, so only the much smaller result travels back. It cuts data transfer and, in a bridge architecture, keeps raw rows at the source.

Updated 2 sources3 min read

Query pushdown is an optimization in which a query engine sends parts of a query (filters, column selection, aggregations, joins, limits) down to the source system to run there, so only the much smaller result travels back. It cuts network transfer and memory use. In a bridge architecture it also means raw rows never leave the source.

What is query pushdown?

Federated engines such as Trino read from many sources through connectors. Trino’s documentation lists predicate, projection, dereference, aggregation, join, limit and top-N pushdown. With predicate pushdown, for example, the connector hands the WHERE clause to the data source, which evaluates it there.1 PostgreSQL’s foreign data wrapper does the same between databases: postgres_fdw sends WHERE clauses to the remote server and skips columns the query does not need, to reduce the data transferred.2

Bridge mode vs Cloud modeBridge mode pushes queries down to your database and returns results; Cloud mode syncs data first.BRIDGE MODE · LIVE PUSHDOWNCLOUD MODE · MANAGED SYNCPostgreSQLYour databasestays putkimo-bridgeon your serverKimoplans the querySQL in · aggregates outStored on KimoNothing (optional short cache)FreshnessLive, on every querySpeedBound by your databaseBest forSensitive, regulated dataStripeYour sourcesDBs · SaaS APIsSyncscheduled · CDCKimo cloudencrypted · your regionStored on KimoEncrypted copy, your regionFreshnessPer schedule, e.g. 15 minSpeedSub-second, cachedBest forHistory, heavy dashboardsHybrid: choose per source, mix freely
Figure.Bridge mode pushes queries down to your database and returns results; Cloud mode syncs data first.

Scroll sideways to see the full diagram.

Example: what actually gets sent

The question, and the query pushed to the source
sql
-- Question: revenue by plan for the last 30 days
-- Without pushdown: SELECT * FROM invoices;  -- every row and column travels

-- With predicate, projection and aggregation pushdown:
SELECT plan, SUM(amount) AS revenue
FROM invoices
WHERE paid_at >= CURRENT_DATE - INTERVAL '30 days'
GROUP BY plan;

On a table with millions of invoices, the second form returns a handful of rows. The result is the same either way; only where the work happens changes.

Common misconceptions

  • “The whole query is always pushed.” Pushdown is per operation. By default, postgres_fdw only sends WHERE clauses that use built-in (and immutable) operators and functions; others are checked locally after the rows are fetched.2
  • “Pushdown is free.” It moves the work onto the source. Point heavy analytical queries at a read replica, and set rate limits.
  • “If the plan looks fast, it was pushed.” Verify it. In Trino, when a predicate is pushed down, the EXPLAIN plan no longer shows a ScanFilterProject operation for it.1 With postgres_fdw, EXPLAIN VERBOSE prints the exact remote SQL.2

How Kimo uses query pushdown

Kimo’s semantic layer compiles every dashboard tile and Ask Kimo question into SQL for the source’s dialect. In Bridge mode, Kimo Bridge runs that SQL on your server under a read-only role and returns only the aggregated result over an outbound-only tunnel. Kimo keeps no copy of your rows, apart from optional short-lived result caches you can switch off. Learn more in the Bridge security model and Cloud, hybrid or Bridge?.

Frequently asked questions

Is query pushdown the same as a federated query?

No. A federated query reads from several sources at once. Pushdown is the optimization that makes it practical, by doing as much work as possible inside each source.

Will pushdown overload my production database?

It can if queries are heavy and frequent. Use a read replica, a read-only role with statement timeouts, and rate limits on the engine side.

Can joins across two different databases be pushed down?

Only the parts that live in each source. The engine pushes filters and aggregations to each side, then joins the reduced results itself.

Sources

2 references
  1. Pushdown (opens in a new tab)
    Trino Documentationtrino.io

    Types of pushdown; predicate pushdown processed by the data source; no ScanFilterProject in EXPLAIN when pushed.

  2. postgres_fdw: access data stored in external PostgreSQL servers (opens in a new tab)
    PostgreSQL Global Development Grouppostgresql.org

    Remote query optimization; WHERE clauses sent to remote; built-in operators only by default; EXPLAIN VERBOSE shows remote SQL.

External sources were accessed at the time of writing. Kimo product details, customers and figures in examples are illustrative unless a source is cited.

Used in

Where Query pushdown shows up in practice

5 resources
GuideBeginner
All

Install Kimo Bridge with Docker

Run the bridge next to your database in minutes: outbound-only, read-only, revocable.

Arno Visser
10 min read
GuideIntermediate
All

The Kimo Bridge security model

What leaves your network, what never does, and how every query is authorized and audited.

Rhea Patel
10 min read
Whitepaper
All

Your Data, Your Rules

The hybrid analytics architecture behind Kimo Bridge: live query pushdown, optional cloud sync, and zero-trust by default.

Arno Visser
22 pages
ArticleProduct
All

Introducing Kimo Bridge: your data stays home

A small package you install next to your database opens a private, outbound-only bridge to Kimo. Query live, store nothing — or sync to our cloud when you want to.

Théo Marchand
7 min read

Your data officer is ready.

Connect a source — or install Kimo Bridge and keep data on your servers — then ask a question and get an answer you can audit.