f05f2f9945
The delivery detail point lookup queried WebhookDelivery by id and environment only. The table is RANGE-partitioned on createdAt, so with no createdAt predicate Postgres cannot prune and probes every daily partition. The delivery id now embeds its mint timestamp (a 6-byte big-endian unix ms prefix plus random bytes, base32hex encoded), and the engine stores that same timestamp as the row's createdAt, so the id's timestamp is the partition key. getDelivery recovers it from the friendlyId and adds it as an exact predicate, pruning to the row's partition for every caller.