We have several tables in Postgres that waste a frustrating amount of space due to lack of both signed and 1-byte ints in Postgres, especially because we don't use Postgres/Prisma enums (they have string values, which clashes with enums we use in the game, and we often use those values in bit fields).
Adopting https://github.com/petere/pguint would solve this and allow us to save a bit of DB space - though I expect the most space by far will be the stats JSON fields on LeaderboardRun and PastRun.
Once we get 0.10.0 live and start getting good DB metrics, let's take a look and form some better estimates of what's taking out what amount of space in DB. If we think this'll be a major benefit, let's give it a go.
We have several tables in Postgres that waste a frustrating amount of space due to lack of both signed and 1-byte ints in Postgres, especially because we don't use Postgres/Prisma enums (they have string values, which clashes with enums we use in the game, and we often use those values in bit fields).
Adopting https://github.com/petere/pguint would solve this and allow us to save a bit of DB space - though I expect the most space by far will be the
stats
JSON fields onLeaderboardRun
andPastRun
.Once we get 0.10.0 live and start getting good DB metrics, let's take a look and form some better estimates of what's taking out what amount of space in DB. If we think this'll be a major benefit, let's give it a go.