core
core copied to clipboard
PostgreSQL migration
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
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.