Skip to content

[AQE] Reorder join trees using runtime cardinality statistics #641

Description

@gabotechs

Part of #522.

Use statistics collected by runtime sampling for swapping JOIN orders during dynamic planning.

The plan mutation should likely happen right in this point:

// Propagate the final task_count inferred based on runtime statistics and compute cost.
// Here is where leaf nodes are scaled up by ScaleUpLeafNodeHandler, and the
// plan is finally left ready for distribution.
input_stage.plan = nb_ctx

At that point, all the NetworkBoundary nodes below have already collected runtime stats, so we have a very good intuition about the incoming data.

It would be cool to rely on upstream rules for join selection, but I'm not sure if it's possible.

For more info about the background of this issue, see #522.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions