Databases

Shard design doesn't start from your tables

Neki explains how shard groups co-locate related PostgreSQL rows to keep joins and transactions on one shard. Tables in the same group hash their shard keys the same way, so rows with matching key values land together and queries can avoid fan-out across clusters. The article says shard groups should be planned during migration, but Neki’s Reshard workflow can later change a table’s shard key or shard count.

AI-written summary, checked against the cited sources. How summaries work

Image: PlanetScale

Read at PlanetScale