Joins in ParadeDB combine rows from two or more tables based on related columns, enabling richer, multi-table analytics.
Joins let you read related data that lives in separate tables—customers with their orders, orders with their items, or products with current stock—without duplicating rows or denormalizing schemas.
ParadeDB inherits PostgreSQL’s INNER, LEFT, RIGHT, and FULL joins, plus CROSS join and LATERAL joins. All types work the same way you already know from core Postgres.
Start with SELECT columns FROM table1 INNER JOIN table2 ON table1.col = table2.col;
. Replace the table and column names with your ParadeDB tables.
Chain the joins: ... FROM A JOIN B ON ... JOIN C ON ...
. Each additional join adds another ON
clause that links the new table to an already-joined result.
Use LEFT JOIN when you must keep all rows from the left table even if the right table lacks matches—e.g., show customers who have not yet placed orders.
Yes. ParadeDB uses PostgreSQL’s planner. Creating indexes on join keys (customer_id
, product_id
, etc.) speeds lookups and reduces disk I/O.
Filter early with WHERE
clauses, project only needed columns, and ensure join keys are indexed. For very large datasets, consider partitioning or materialized views.
The query in the next section calculates each customer’s total spend by joining Customers
, Orders
, and OrderItems
.
Omitting a join condition causes a Cartesian product; forgetting to index join keys slows queries dramatically. See details below.
Copy the example query, swap table names if yours differ, and adapt the WHERE
filters.
No. ParadeDB is Postgres compatible; the join syntax is identical.
Yes. ParadeDB supports mixing storage types in joins, but make sure time partitions are pruned with appropriate WHERE
clauses.
Yes. Vector columns can participate in joins, but equality comparisons must use the exact same stored vector. Nearest-neighbor search is done with <->
operators, not joins.
Absolutely. PostgreSQL has no hard join-count limit. Performance depends on indexes and query planning, not table count.
They can be, because the planner must also keep unmatched rows. Filter early and index join keys to offset the cost.