Skip to content

hold duplicate sqls and return it together #130

Open
@DeoLeung

Description

@DeoLeung

Is your feature request related to a problem? Please describe.

the application may issue duplicate queries at the same time

backend A sends select a from b, backend B also sends select a from b at the same time

my pg will suffer from processing identical queries especially when the sql consumes disk io

Describe the solution you'd like

support holding the duplicate queries, only issue one to pg at a time, when it returns , return the same result to all clients

maybe add a set dedup = true to only apply to certain queries

Describe alternatives you've considered

normally we do it in applications using redis lock, but we need extra storage to distribute the result, like store it in a redis key

Additional context
Add any other context or screenshots about the feature request here.

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