No. of Recommendations: 2
If you have to search the data fields in a database the system crawls to a halt after a few thousand records. To remain efficient the database needs indexes that are updated as data changes in the database. I had a customer in London were I had forgotten to define the required indexes. A few months after delivering the job I got a call complaining that the application had slowed to a crawl. It took me a couple of hours to define the indexes and the next day the app was as fast as Superman! Google must have indexes up the wazoo!

In relational databases you specify which fields of any table should be indexed and the kind of index it is. You do this as part of designing the data tables. If I were designing an OOP document storage database I would define the indexes in the object's class, not much different than in relational except in a different place but with the advantage that everything about the object is in one place. Simplifies maintenance.

Speculating, Mongo would need a way to create and maintain the indexes and the object would have to tell Mongo which they are. So far Mongo and relational would be about the same. Relational can't or doesn't index text and blob fields (text is searchable but slow). Mongo would need to index these fields much like Google indexes web pages. I don't know how that's done.

I don't know if this helps or even if it is entirely accurate so get yourself several pinches of salt.

Denny Schlesinger
Print the post  


What was Your Dumbest Investment?
Share it with us -- and learn from others' stories of flubs.
When Life Gives You Lemons
We all have had hardships and made poor decisions. The important thing is how we respond and grow. Read the story of a Fool who started from nothing, and looks to gain everything.
Contact Us
Contact Customer Service and other Fool departments here.
Work for Fools?
Winner of the Washingtonian great places to work, and Glassdoor #1 Company to Work For 2015! Have access to all of TMF's online and email products for FREE, and be paid for your contributions to TMF! Click the link and start your Fool career.