Re:Do Not Recommend: User Provided Primary Keys
by evanelias on Thursday February 24, 2022 @10:10PM
(#30463319)
MySQL 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-functi...
[2] https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functi...
Re:Do Not Recommend: User Provided Primary Keys
by hans_castorp on Thursday February 24, 2022 @06:04AM
(#30453368)
> 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
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-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?