Skip to content

feat: Add Pre-Execution Warning for High-Cardinality Queries in Production #2927

@krasnovdm

Description

@krasnovdm

Problem
Users can accidentally execute high-cardinality queries (e.g., FullScan/TableLookUp on large tables) directly in production databases via the UI, causing performance degradation or outages.

Proposed Solution
Implement a pre-execution safety check:

  1. Run EXPLAIN to estimate query cardinality and resource impact
  2. If high-risk conditions are detected and target is production DB:
    • Show prominent modal warning with text:

    "This query may severely impact database performance. I understand the risks and wish to proceed."

    • Require explicit user confirmation (checkbox + button)
  3. Criteria for triggering:
    • Full table scans on large datasets
    • Missing shard keys in filters
    • High estimated row processing

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