Skip to content

Add admin-configurable global query refresh cooldown to prevent unnecessary cost #7675

Description

@Lee2532

Background

In environments using cost-based query engines such as BigQuery, each query execution incurs a direct cost. Currently, Redash allows users to freely refresh queries or dashboards without any restriction, which can lead to excessive and unnecessary query executions.

Problem

  • Users can repeatedly trigger query executions without limits
  • In cost-based systems (e.g., BigQuery), this results in unnecessary charges
  • Accidental frequent refreshes can significantly increase operational costs
  • No centralized control for administrators to mitigate this behavior

Proposed Solution

Introduce a global query refresh cooldown configurable by administrators.

Key Features

  • Add a setting in the admin panel to define a minimum refresh interval (in seconds)
  • Apply this cooldown globally to all users
  • Prevent query execution if a user attempts to refresh within the configured interval

Expected Behavior

  • Admin sets a cooldown value (e.g., 60 seconds)
  • When a query is executed, the timestamp is recorded
  • Any subsequent execution attempts within the cooldown period are rejected
  • Queries can be executed normally once the cooldown period has passed

Motivation

This feature helps:

  • Prevent unnecessary costs in systems like BigQuery
  • Provide administrators with control over query execution frequency
  • Improve cost efficiency and system stability in shared environments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions