昨年までは、DB設計において uuid を使わないキー値には int よりも bigint を優先していた。しかし今では、ログのような頻繁に書き込まれるデータでない限り intを使うようになった。

bigint を採用していたのは将来の拡張を見据えた判断だったが、自分が開発するサービスでは int の上限(約20億)を超えることはまずないと気づいた。そして、いつか bigint に移行しなければならない規模のサービスに成長してほしいとも思っている。

0

If you have a fediverse account, you can quote this note from your own instance. Search https://hackers.pub/ap/notes/0195f183-5899-7180-98ae-9e5a4ef4132d on your instance and quote it. (Note that quoting is not supported in Mastodon.)