|
|
|
|
|
by antender
1888 days ago
|
|
Also, from the point of query optimisation this is a really bad idea. Usually you DO actually care about size of fields in SQL databases, because something like BOOLEAN is usually stored as single byte (or bit in a bitfield) vs 4 bytes or even 8 in case of timestamp. This not only multiplies on disk usage by at least 4 times, but also makes ALL indexes using this field way bigger. Also boolean indexes can be compressed (or stored as bitmaps), while timestamp indexes contain lots of unique values, so they can't be.
This is also the reason why serial IDs are way better than UUIDs for internal IDs. |
|
There are three core problems with that:
There is the KSUID[1] if people want a time-sortable thing that is near-enough to a UUID.[1] https://github.com/segmentio/ksuid