Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adopting pguint in Postgres/Prisma #859

Open
tsa96 opened this issue Oct 28, 2023 · 0 comments
Open

Consider adopting pguint in Postgres/Prisma #859

tsa96 opened this issue Oct 28, 2023 · 0 comments
Assignees
Labels
For: Backend This is something to do for the backend (server folder) of the website. For: Production Priority: Medium Something that should be tried to be done in this release, but not as important as High priority. Type: Dev/Internal Something that is more internal to development than end user facing.

Comments

@tsa96
Copy link
Member

tsa96 commented Oct 28, 2023

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.

@tsa96 tsa96 added Priority: Medium Something that should be tried to be done in this release, but not as important as High priority. Type: Dev/Internal Something that is more internal to development than end user facing. For: Backend This is something to do for the backend (server folder) of the website. For: Production labels Oct 28, 2023
@tsa96 tsa96 self-assigned this Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For: Backend This is something to do for the backend (server folder) of the website. For: Production Priority: Medium Something that should be tried to be done in this release, but not as important as High priority. Type: Dev/Internal Something that is more internal to development than end user facing.
Projects
None yet
Development

No branches or pull requests

1 participant