Skip to content

add a cost_threshold global configuration option #151

@ethanpailes

Description

@ethanpailes

SQL has an EXPLAIN statement. Let's use it. We can allow users to configure a max allowable cost for a query. Any query with a higher cost will need to have the cost_threshold = <higher value> option set for it or we generate a hard error.

One potentially tricky part of this is that we typically use an empty database for codegen, and the costs will differ based on the actual contents of the database. For this reason we might want to add a "check mode" so that people can avoid running these checks against their prod db in their main build pipelines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions