Comment

Comment by awesome_dude

> Superficially, it seems that embedding a timestamp in the ID can remove the need to track the creation time in a separate database column, providing marginally more efficient database operations. If you need to list things ordered by creation time very often, it’s useful if the primary index gives that behavior, removing the need for another index.

This glares for me - I'm not "listing" by creation time per se; I'm taking advantage of locality - the page of data that a given key's data is in should also contain data of other keys created around the same time.

That locality means that I have less disk calls if I want to get the data for a series of rows that were created around the same time.

The blog post seems to be saying that (worst case) I cannot rely on that aspect.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton