3 ms·
Doesn't numeric storage save space and make indexing faster? (This is a naive question, I'm not asserting it.) Yeah, numbers get you fun stuff like overflows a
by function_seven 4y ago
Doesn't numeric storage save space and make indexing faster? (This is a naive question, I'm not asserting it.)
Yeah, numbers get you fun stuff like overflows and wrap-arounds, etc. But sorting is faster (sorting "99" before "100" is more complex than 99 before 100) and space requirement is lower (6 bytes can store a unique ID for 281 trillion objects, but 6 characters only permits 1 million if you're storing them as strings).
Or is there some datatype that combines the space- and sort-efficiency of a numeric type, but doesn't bring the baggage of assuming they represent quantities?
- skunkworker 4y agoXID wraparound is one of the things that makes me wish Postgres would go 64bit on some of their internal data structures.