Which Ones Scatter
A Vitess keyspace holds orders across 16 shards. The keyspace has exactly one vindex: a hash vindex on customer_id. There is no lookup vindex on any other column.
Select every query the router must send to all 16 shards. More than one applies.
-- A
SELECT * FROM orders WHERE customer_id = 8812 AND status = 'open';
-- B
SELECT * FROM orders WHERE order_id = 40119;
-- C
SELECT * FROM orders WHERE customer_id IN (8812, 9134, 10007);
-- D
SELECT customer_id, COUNT(*) FROM orders
WHERE created_at >= '2026-08-01' GROUP BY customer_id;
Sign in to answer questions and track your progress
Sign In