Friday 20 May 2016

Background Index Creation in MongoDB





Lecture Notes

As of MongoDB 2.6, background index creation will occur on secondaries as well as
the primary when a background index is created on the primary of a replica set.

Text Indexes in MongoDB




Lecture Notes

In this lesson, Dwight uses ensureIndex.
This command has been deprecated in favor of createIndex.

Geospatial Indexes in MongoDB.


Lecture Notes

In this lesson, Dwight uses ensureIndex. This command has been deprecated in favor of createIndex

TTL Indexes in MongoDB.


Sparse Indexes in MongoDB



Lecture Notes

In this video, Dwight uses the ensureIndex command, which is now deprecated. You would now use createIndex.

Quiz

Quiz: Sparse Indexes

If an index is unique AND sparse, can 2 documents which do
not include the field that is indexed exist in the same collection?
Yes

No


Ans.

Yes

Unique Indexes in MongoDB


Lecture Notes
In this video, Dwight uses the ensureIndex command, which is now deprecated. You would now use createIndex.

Quiz

Quiz: Unique Indexes

If an index is created with the options document, { unique : true } can 2 documents which do not include the field that is indexed exist in the same collection?
Yes

No
Ans.

NO

Wednesday 4 May 2016

Index Notes in mongoDB


Lecture Notes
In this video, Dwight mentions that the index is used automatically if it is present. This is no longer always true if you are sorting using a sparse index, but remains true otherwise. He also uses the ensureIndex command, which is deprecated as of MongoDB 3.0 in favor of createIndex
Quiz: Index Notes
A MongoDB index can have keys of different types (i.e., ints, dates, string)
1.True
2.False


Ans.
True
Advance on Index Notes in MongoDB