50 Tips and Tricks for MongoDB Developers by Kristina Chodorow

50 Tips and Tricks for MongoDB Developers by Kristina Chodorow

Author:Kristina Chodorow [Kristina Chodorow]
Language: eng
Format: epub, pdf
Tags: COMPUTERS / Database Management / General
ISBN: 9781449304607
Publisher: O'Reilly Media
Published: 2011-04-18T16:00:00+00:00


Figure 3-2. A B-tree, possibly for an index on a field with integer values.

When your query includes x as part of the criteria, MongoDB will notice that it has an index on x and will look through the ordered tree of values. Now, instead of looking through every document, MongoDB can say, “Is the value I’m looking for greater than or less than this tree node’s values? If greater, go to the right, if less, go to the left.” It continues in this manner until it either finds the value it’s looking for or it sees that the value it’s looking for doesn’t exist. If it finds the value, it then follows the pointer to the actual document, loading that document’s page into memory and then returning it (Figure 3-3).



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.