Skip to content

Add a query option to use more replica groups #8217

@snleee

Description

@snleee

Replica Group Segment Assignment & Routing is added to have control on the query fanout. As a result, we now can scale the cluster horizontally.

One side effect is that we can never use the full resource available in the cluster for a single query. We will use 1/n servers to compute a query where n = number of replica groups.

There's a use case where a user wants to run the expensive query (low qps) and wants to use more resources that are available in the cluster.

To provide the control on the query fanout, we can add query options like the following:

SELECT COUNT(*) FROM T GROUP BY A OPTION(numReplicaGroups=2)

or

SELECT COUNT(*) FROM T GROUP BY A OPTION(routing=balanced)

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