Skip to content

Deduplicate uncorrelated scalar subqueries #21619

@neilconway

Description

@neilconway

Is your feature request related to a problem or challenge?

Per #21240 (comment) , if the same subquery (identical SQL text) appears multiple times in a query, it will be planned and evaluated multiple times. In principle it should be fine to evaluate it only once, provided the subquery doesn't contain any volatile functions (e.g., random()).

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions