PlanetScale·
Building a faster, lazier router for Postgres
TL;DR
PlanetScale’s Neki router adds overhead when routing queries across PostgreSQL shards, so it avoids decoding data it doesn’t need to understand. It preserves PostgreSQL wire-format bytes, decodes only necessary parameters or columns, and uses pointers to select or reorder rows without copying them. This reduces parsing, allocations, and copying—even for some cross-shard queries—while still supporting limits and global sorting.