API design · Multiple choice

A feed is paged with a cursor on created_at. Why should the cursor also include the post id?

hard Databases

Options

Why

With only the timestamp, "after 12:00:00.123" skips other posts from that same instant. A composite cursor plus an index on (created_at, id) keeps the order total and the seek fast.

Review this in your daily deck All cards in API design