-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Needs TriageThis issue needs to be correctly labelled and triagedThis issue needs to be correctly labelled and triagedType: Bug
Description
Overview of the Issue
pushDerived in go/vt/vtgate/planbuilder/operators/route_planning.go currently uses an explicit check for engine.EqualUnique opcodes, which means that other single shard routing opcodes will not be merged together.
Using isSingleShard() would allow more queries to be merged and pushed down to MySQL.
An example query that wouldn't be merged today would be an outer query targeting a sharded keyspace, containing a subquery that's comprised of a union of two or more queries that fetch data from an unsharded keyspace. In this case, the inner UNION would be mergeable, but won't be merged together today.
Reproduction Steps
n/a
Binary Version
n/aOperating System and Environment details
n/aLog Fragments
Metadata
Metadata
Assignees
Labels
Needs TriageThis issue needs to be correctly labelled and triagedThis issue needs to be correctly labelled and triagedType: Bug