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

PostgreSQL migration #429

Open
builder-247 opened this issue Jun 10, 2020 · 1 comment
Open

PostgreSQL migration #429

builder-247 opened this issue Jun 10, 2020 · 1 comment
Assignees
Labels
important Issues that should be focused on refactor Code that should be improved

Comments

@builder-247
Copy link
Member

builder-247 commented Jun 10, 2020

Limitations of MongoDB:

  • Querying nested json data is really slow - this caused custom leaderboards to break at around 80k players
  • Since MongoDB stores key/value pairs, it takes a lot of storage space

PostgreSQL's JSONB format allows us to store the same data taking less space and being faster to query.

One big downside is that a lot of the API functionality has to be rewritten, for example a lot of filtering relies on MongoDB's query language.

Checklist moved to PR

@builder-247 builder-247 added refactor Code that should be improved important Issues that should be focused on labels Jun 10, 2020
@builder-247 builder-247 self-assigned this Jun 10, 2020
@apollyon600
Copy link

apollyon600 commented Jun 13, 2020

Try saving all of the item data inside 1 object and then filter it when needed.
Instead of having separate data for each item if I'm reading this correctly.

@builder-247 builder-247 linked a pull request Jun 20, 2020 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
important Issues that should be focused on refactor Code that should be improved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants