IlluminusLimited / PinsterApi

Pinster's public API
https://api-prod.pinster.io
GNU General Public License v3.0
2 stars 1 forks source link

Don't use UUIDs as primary keys #102

Closed scytherswings closed 5 years ago

scytherswings commented 6 years ago

Stop using UUIDs as primary keys. We need to implement friendlyId instead. UUIDs inflate indexes which slows them down. If we need pretty, readable URLs we should use a slug instead of the PK anyway. Also integer keys scale better and overall are less data to join on in a large database (think string sorting is way more expensive than integer sorting, for example). Also we don't have random inserts coming from outside sources so we don't need the uniqueness anyway.

scytherswings commented 6 years ago

After reading more, this could be a thing that also doesn't matter. I haven't figure out if it's important or not.

scytherswings commented 5 years ago

Nope, not changing.