Hacker News new | ask | show | jobs
by xnorswap 440 days ago
Counterpoint: Natural sorting likely will be orders of magnitude slower sorting than ordinal sorting.

For most situations, the better solution is storing the index separately to the name in another column or in metadata.

But for some stores, there isn't an easy way to do to store or sort on metadata, and so prefixing leading zeroes helps keep things stored more naturally while using the more efficient sort.

1 comments

Oh of course it is. But if you have serveral 100s up to several 1000s items, you do not care. Computers are here to do the heavy lifting. If we talk about millions of items, its completly different story. Probably simple numerical ID is out of option and you start to shard them somehow. Use right tool for right task!