4 ms·
The reason I don't like the internal-int-external-UUID strategy is that all of your queries now require an extra join. It's no longer "select microblog.* where
by mark242 9y ago
The reason I don't like the internal-int-external-UUID strategy is that all of your queries now require an extra join. It's no longer "select microblog.* where userid = ?" now it's "select microblog.*,user.id from microblog,user where microblog.userid = user.id and user.uuid = ?".
This may be practical from a storage standpoint but string-based indexes on an SSD are pretty damned efficient.
- tdicola 9y agoThat's why you typically add caching (like cookies) that store the UUID with some user context so it can be provided directly in queries.
- _kyran 9y agoThe benefit of an external guid is that it obfuscates counts. I've seen cases where it's possible for a business to track a competitor's growth by watching a public facing user id count increase.
- user5994461 9y agoI do that too. Ask an invoice from a HN startup. See the reference number at the top "2017-0000438". They had 438 potential customers this year :D