JOIN types, including:
INNER JOINLEFT JOINRIGHT JOINFULL JOINSEMI JOINANTI JOIN
JOIN queries involving search operations through a feature called join pushdown.
Our goal is to support and accelerate all JOIN queries shaped like Top-K or aggregate queries. Because join pushdown is enabled by default, ParadeDB automatically executes parts of a JOIN directly inside the ParadeDB executor for queries that meet the requirements.
If a query does not meet the requirements, ParadeDB falls back to PostgreSQL’s native row-based execution.
Join Pushdown
Join pushdown reduces query latency by answering as much of the query as possible using the index before touching the underlying tables.To disable join pushdown for debugging, run
SET paradedb.enable_join_custom_scan TO off;.Requirements for Join Pushdown
Join pushdown is automatically used when a query meets several conditions. If any of these are not satisfied, PostgreSQL will simply execute the join normally.
If any checks fail, ParadeDB will emit a
NOTICE explaining why and fall back to Postgres’ native join execution.
To demonstrate, let’s create a second table called orders that can be joined with mock_items:
Expected Response
Supported Join Types
Inner Join
An inner join returns rows where a matching row exists in both tables according to the join condition.Expected Response
EXPLAIN on the query and look for a ParadeDB Join Scan in the output.
Expected Response
Semi Join
A semi join returns rows from the left table when a matching row exists in the right table. In SQL, this usually appears as anIN or EXISTS query:
Expected Response
EXPLAIN on the query and look for a ParadeDB Join Scan in the output.
Expected Response
Anti Join
An anti join returns rows from the left table when no matching row exists in the right table. This typically appears as NOT EXISTS or NOT IN.Expected Response
EXPLAIN on the query and look for a ParadeDB Join Scan in the output.
Expected Response
Left Join
A left join returns all rows from the left table and matching rows from the right table.Expected Response
EXPLAIN on the query and look for a ParadeDB Join Scan in the output.
Expected Response
Right Join
A right join returns all rows from the right table and matching rows from the left table.Expected Response
EXPLAIN on the query and look for a ParadeDB Join Scan in the output.
Expected Response
Full Join
A full join returns all rows when there is a match in either the left or the right table.Expected Response
EXPLAIN on the query and look for a ParadeDB Join Scan in the output.
Expected Response