Skip to content

Choosing what to shard on

A table is being split across shards. Most queries filter by tenant_id, and a few report across all tenants.

What is the best shard key, and what is the cost?