If I was building a database that stores users' posts, follows etc., with the users having external 32-char identifiers, would it make more sense to have foreign keys for user IDs as integers everywhere, with a user table mapping int to ID, or to have the ID strings everywhere and do joins using strings? Would such string joins be slower? 🤔
[#]mysql #postgres #postgresql #sql
=> More informations about this toot | More toots from mackuba@martianbase.net
I'd assume that joins and lookups by long-ish strings would be slower than by ints, but maybe not, given that with a separate table mapping to ints I'd need to always do an extra lookup there?…
=> More informations about this toot | More toots from mackuba@martianbase.net
text/gemini
This content has been proxied by September (3851b).