core icon indicating copy to clipboard operation
core copied to clipboard

PostgreSQL migration

Open builder-247 opened this issue 5 years ago • 1 comments

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 avatar Jun 10 '20 13:06 builder-247

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.

johnaqu1no avatar Jun 13 '20 10:06 johnaqu1no