3 ms·
In case anyone needs the equivalent for MariaDB: https://mariadb.com/kb/en/uuid-data-type/ https://mariadb.com/kb/en/uuid-data-type/ Couldn't actually find som
by KronisLV 5y ago
In case anyone needs the equivalent for MariaDB: https://mariadb.com/kb/en/uuid-data-type/ https://mariadb.com/kb/en/uuid-data-type/
Couldn't actually find something similar for MySQL apart from using BINARY as the datatype, historical sources also refer to that though are (hopefully?) out of date: https://dev.mysql.com/blog-archive/storing-uuid-values-in-mysql-tables/ https://dev.mysql.com/blog-archive/storing-uuid-values-in-my...
An observation: seems like PostgreSQL is HN's darling (and maybe the industry's as a whole), i wonder why MariaDB doesn't get similar amounts of attention, apart from maybe not being as actively developed? Or maybe its relative simplicity or history works against it here?
- hans_castorp 5y ago> i wonder why MariaDB doesn't get similar amounts of attention, apart from maybe not being as actively developed? I can obviously only speak for myself. But (in my opinion) Postgres simply offers the better overall package. I don't think there is a single "killer feature" that makes it better, but the sum of numerous things (JSON support, indexing, parallel query) that make it more efficient (and easier) to work with. Note that the UUID type in MariaDB is not yet part of an officially released version. 10.7 is still in preview/alpha
- evanelias 5y agoMariaDB 10.7 is now GA. They've recently moved to a once-per-quarter release series model, and 10.8 is the current preview/alpha series.
- evanelias 5y agoMySQL doesn't have a native uuid column type, but it does provide conversion functions UUID_TO_BIN() [1] and BIN_TO_UUID() [2]. These also have a convenient optional "time swapping" flag, to improve insertion order / btree efficiency. [1] https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_uuid-to-bin https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functi... [2] https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_bin-to-uuid https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functi...