All posts by Michał Knasiecki

Impact of data model on MongoDB database size

So I was tuning one of our services in order to speed up some MongoDB queries. Incidentally, my attention was caught by the size of one of the collections that contains archived objects and therefore is rarely used. Unfortunately I wasn’t able to reduce the size of the documents stored there, but I started to wonder: is it possible to store the same data in a more compact way? Mongo stores JSON that allows many different ways of expressing similar data, so there seems to be room for improvements.

Michał Knasiecki

michal-knasiecki

Java/Kotlin/Scala software developer working at Allegro in automatic frauds prevention team.