Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7053371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:29:49+00:00 2026-05-28T03:29:49+00:00

I got a application that has to store a lot of sparse data. All

  • 0

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, ...}

To something like:

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:29:50+00:00Added an answer on May 28, 2026 at 3:29 am

    This is highly theoretical question, and “theory is a bad companion when it comes to performance”. Even if there was a consistent, well-established theory it would be extremely complicated because you have to account for caching (i.e. operations have a history, no time-reversibility, need very detailed usage patterns, etc.), many non-linear effects (most algorithms aim to achieve some log(n) or n log(n) behavior) and discontinuities in the ‘performance function’ (if your RAM can no longer hold the indexes, swapping starts), and hardware specificities (swapping on an SSD is an order of magnitude faster than on spindles), etc.

    The fastest and most reliable way to find out how it behaves is to implement it. That implementation can be flaky, hacky and what not. But you can get a good perf indication in a couple of hours.

    Some theoretical input:

    In essence, using multiple databases is like a bucket sort: You have some code that can quickly identify which bucket to query. In those buckets, the indexes are a bit smaller, hence a little faster. On the other hand, search times should increase only logarithmic with increasing index size. Especially for large collections, this means that there is practically no difference.

    Disk space will be used more efficiently (unless you tweaked your database settings heavily), because MongoDB will allocate a .ns file of 16MB size and at least 64MB of data files for each database, even if you only store a few documents. Hence, if the number of small databases is large, your disk footprint should be better after the migration, despite the additional field.

    Changes to the RAM footprint should be negligible, but memory is such an intricate topic that I would not bet a dime.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose you've got a customer who wants an application that has its data centralized
I've got an application for our company that has to store settings in a
I've got an old application that has user passwords stored in the database with
OK this is presumably a hard one, I've got an pyGTK application that has
I've got a fairly large MFC application that has just been migrated from VS6.0
I've got a small Cocoa problem. I have a StatusBar application that has an
I've got an application that downloads data from a 3rd party at 3am every
We've got a Spring based web application that makes use of Hibernate to load/store
Scenario I've got an application written in C# that needs to dump some data
I've got an application that is very graphics intensive and built on DirectX and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.