TLDR Tech / DevOps
The lifecycle of a sharded Postgres query
PlanetScale's Neki router makes a sharded Postgres deployment appear as a single database by handling authentication, protocol parsing, shard-aware planning, connection pooling, and distributed execution across many Postgres nodes. Query performance depends heavily on shard-key choice: co-locating related rows can turn an expensive cross-shard join that requires scatter-gather queries and router-side hash joins into local joins executed independently on each shard.
Read the full story