Join Explosion

Condition

Join with equality condition causes uncontrolled explosion of result set for RUNNING query.

How to fix

  • Check join conditions and actual data in joined columns. Make sure the join condition is correct.

  • Consider adding additional filters to reduce the scale of explosion. Avoid many-to-many joins.

Example

    JoinExplosionCondition(
        min_output_rows=10_000_000,  # join emits at least 10M output rows
        min_explosion_rate=10,  # ratio of output rows to input rows is at least 10x
        warning_duration=60 * 10,  # 10 minutes for warning
        kill_duration=60 * 20,  # 20 minutes for kill
    ),

Specific arguments

  • min_output_rows (int) - how many rows should be produced by Join (recommended min value is at least 1 million to prevent false positives)

  • min_explosion_rate (float) - how many times number of output rows produced by Join is higher than number of input rows (recommended min value is at least 5)

Last updated