'Does storing object / JSON data in chunks improve performance in MongoDB?
I have an application API that is written in Node.JS and uses MongoDB for a database. Part of this system is a messaging service, consisting of 'servers', which have 'channels', similar to the structure of Discord.
Each channel stores an array of references, which corresponds to messages.
This is so that way it's not all one monolithic array of objects. My question is, will storing this array in chunks (for example, by date) improve read/write performance on the database?
I assume it would improve memory usage, which is important for this project, but I don't know much about MongoDB performance and speed.
If I formatted this wrong I'm greatly sorry, I don't normally use StackOverflow so I don't really know much about the formatting rules beyond the basics.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
