Re:You'll regret using natural keys
by caeril on Wednesday June 05, 2024 @12:38PM
(#40587077)
That's why the Good Lord invented caching. In most applications, 90% of your workload will be over ids less than a week old, so your hit rate is likely to be pretty high for this sort of mapping.
[ Parent
| on HN ]
First hit can be a beast. It's workload/entity determinant if caching is enough for this.
Not great if you are spending 1 minute on the first lookup just to do the mapping.
Re:You'll regret using natural keys
by reissbaker on Thursday June 06, 2024 @04:07AM
(#40594823)
Although I think it'll be fine even without a cache for most workloads (it's super easily indexed since the cardinality of random data is extremely high), I'm curious what cache setup you've got that it would take a minute to do a KV lookup — Memcached or Redis for example should be single digit milliseconds or better.