Skip to content- Sources: primary
- Summary: Neki, PlanetScale's sharded Postgres, treats now() and sequence operations as router-only. It evaluates now() once per statement and calls nextval() once per row of the table expression, using an authoritative shard that hosts all sequences. For an UPDATE that sets a column from nextval(), Neki first selects and locks the key columns with FOR UPDATE, then sends a parameterized update for each row.
- Why it matters: It shows the cost of volatile expressions in distributed SQL and why sequence-heavy writes may take more round trips on sharded Postgres.