I got a application that has to store a lot of sparse data.
All documents are separated into Projects.
Each Project has its own database, with its own collections and documents, but all on the same server.
Now I want to make it easier to Query and Reference across Projects.
So I m considering moving all data into 1 database and let each document have a "project" field that I can query against.
The database schema would go from something like:
Project1 (Database)
Task (Collection)
{name: my_task, status: Completed, ...}
Project2 (Database)
Task (Collection)
{name: other_task, status: Started, ...}
类似:
SingleDatabase
Task (Collection)
{name: my_task, status: Completed, project: Project1, ...}
{name: other_task, status: Started, project: Project2, ...}
My guess is that it would have some performance tradeoffs to memory, disk usage, and write performance.
The problem is that I have no idea about how much of an impact it would have, if its worth doing at all.
The question is:
Is it possible to calculate what impact this decision could have on the server?
Something like: given X collections, X document, X indexes... The server would on average have: X/s slower write, require X more memory.. and so on.