Skip to content

Pushdown JOIN USING/ON subquery into IN section for indexed columns #8062

@topvisor-admin

Description

@topvisor-admin

A.id - presented in table index
size of table A is bigger then size of table B

Slow query:

SELECT id, name FROM A
JOIN (SELECT id, name FROM B) USING id

Fast query:

SELECT id, name FROM A
JOIN (SELECT id, name FROM B) USING id
WHERE id IN (SELECT id FROM B)

It's possible to pushdown join subquery into table A filter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp-joinsJOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...comp-query-optimizerQuery plan optimization: physical plan steps, plan-level rewrites and optimizations (QueryPlan pa...featureperformance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions