Use cases

Join MariaDB, PostgreSQL and ClickHouse

A cross-database join reads tables from two or more databases in one SQL query. With Otterstax, your app connects to one MariaDB- or PostgreSQL-compatible endpoint and JOINs MariaDB, PostgreSQL and ClickHouse tables there, instead of joining results in application code.

One app, many data sources

Situation
An e-commerce team joined MariaDB, PostgreSQL and ClickHouse results in application code.
With Otterstax
The glue code became plain SQL through one endpoint, and the platform scaled horizontally.
Result
+36.4%
daily clients
Read the customer story →
AI agents

The same joins for AI agents

The same joins work for an AI agent: connect it to the Otterstax MCP gateway and it queries all sources with one tool.

The problem

Your data lives in multiple data sources. Your code holds them together.

Nobody plans a multi-source stack — it just grows. And every new feature pays for it.

Glue code in every service.

Your app opens connections to MariaDB, PostgreSQL and ClickHouse and joins the results in code. Each new query adds code to maintain and another place where data can go out of sync. Joining two data sources for one feature can take about two sprints.

One database that can’t grow.

Everything sits in one monolithic database. Scaling or splitting it is a multi-year project, and every team waits on it.

How it works

How the federated query engine works without copying data

You can set it up without touching your application code.

2

Point your app at Otterstax.

Use the MariaDB / MySQL or PostgreSQL driver, ORM or BI tool you already have. Analytics tools can use Arrow Flight SQL or ADBC, and AI agents can use MCP.

# .env
- DATABASE_URL=mysql://app@mariadb-prod:3306
+ DATABASE_URL=mysql://app@otterstax:8816
3

Query across everything.

JOIN tables from different data sources, write with INSERT, UPDATE and DELETE, and call ML models as SQL functions (Enterprise).

SELECT u.country, SUM(p.amount)
FROM mariadb_prod.app.users u
JOIN clickhouse_events.analytics.payments p
  ON p.user_id = u.id GROUP BY u.country;
Only the data you ask for moves over the network. Your data sources stay where they are.
How the federated query engine works →
For engineers

Speaks your stack: MariaDB / MySQL and PostgreSQL wire protocols

Wire protocols
MariaDB / MySQL, PostgreSQL, Arrow Flight SQL, ADBC, MCP (AI agents), Spark Connect.
Sources
MariaDB / MySQL, PostgreSQL, ClickHouse, S3-compatible storage (AWS S3, MinIO), Kafka, Redis, ScyllaDB. Spark integration via PySpark, Spark Connect and Spark Java.
Read and write
cross-database JOINs, INSERT / UPDATE / DELETE, CREATE EXTERNAL TABLE, COPY ... TO.
revenue_by_country.sql
-- one query, two databases
SELECT u.country, SUM(e.amount) AS revenue
FROM mariadb_prod.app.users u
JOIN clickhouse_events.analytics.payments e ON e.user_id = u.id
WHERE e.ts > now() - INTERVAL 1 HOUR
GROUP BY u.country;
$ psql -h localhost -p 8817 -U demo demo
Guide

Other ways to join tables across databases

Same-server joins, postgres_fdw and dblink, ClickHouse table functions, DuckDB, Trino and Otterstax side by side, with SQL you can copy and where each one stops working.

For engineering leaders

Less infrastructure. Faster delivery. No lock-in.

From heavy to light infrastructure

AI workloads multiply data volume. With Otterstax you don’t need a central warehouse or data copies, and you run fewer pipelines and pay for fewer licenses.

2×

faster developer onboarding

e-commerce platform
60%

fewer DBA incidents

e-commerce platform
Proof for engineers

Proof for engineers

Measured in customer production on complex cross-database queries over MariaDB or PostgreSQL with Kafka and S3. Baseline: the customer's previous setup, with JOINs in application code and through ETL.

Cross-database JOIN, first run

+10–20%
overhead vs the previous setup, worst case

Same query, repeat runs

+5–10%
plan and metadata cache, data cache, warm connections

Trade-offs: every query adds one network hop, and a query across several data sources waits for the slowest one. The planner pushes heavy work down to the sources to compensate.

FAQ

Frequently asked questions

All questions →

How do I query MariaDB and ClickHouse together?

Connect both to Otterstax and query them from one MariaDB / MySQL-compatible endpoint. A single SQL query can JOIN tables from both databases.

Do I need to change my application code?

No. Your app connects with its existing MariaDB / MySQL or PostgreSQL driver or ORM. You only change the connection string. Otterstax translates part of the SQL for the target database and passes database-specific SQL through as is.

What is the latency overhead?

On complex cross-database JOINs, 10–20% on the first run and 5–10% on repeat runs, compared with JOINs in application code or through ETL. Repeat runs are cheaper thanks to plan and metadata caching, data caching and warm connections. Measured in customer production.

Where does Otterstax get slow?

When a JOIN brings hundreds of millions of intermediate rows into Otterstax, and when a source database is already overloaded. Every query also adds one network hop, and a query across several data sources waits for the slowest one. The planner pushes heavy work down to the sources to compensate.

Which data sources are supported?

Today: MariaDB / MySQL, PostgreSQL, ClickHouse, S3, Kafka, Redis and ScyllaDB, plus Spark integration via PySpark, Spark Connect and Spark Java. Apps and tools connect over the MariaDB / MySQL and PostgreSQL wire protocols, Arrow Flight SQL, ADBC and MCP. On the roadmap: BigQuery, MongoDB, MS SQL Server, vector databases and Iceberg / Delta.

See Otterstax on your own data sources

In a 30-minute call we'll map your stack and show a working query across your data sources.