Answer: c
Explanation: These indexes have a more random distribution of values along their range, but only support equality matches and cannot support range-based queries.

2. Point out the correct statement :
a) Whether the use of a compound index or the use of an index intersection is more efficient depends on the particular query and the system
b) Certain restrictions apply to indexes, such as the length of the index keys or the number of indexes per collection
c) For queries that specify compound query conditions, if one index can fulfill a part of a query condition, and another index can fulfill another part of the query condition, then MongoDB can use the intersection of the two indexes to fulfill the query
d) None of the mentionedView Answer

Answer: d
Explanation: In general, each index intersection involves two indexes; however, MongoDB can employ multiple/nested index intersections to resolve a query.

3. ________ index type, which indexes the hash of the value of a field.
a) Hashed
b) Unique
c) Multikey
d) None of the mentionedView Answer

Answer: a
Explanation: Hashed indexes support equality matches and cannot support range-based queries.

Answer: c
Explanation: Other than the unique constraint, unique indexes are functionally interchangeable with other MongoDB indexes.

5. Point out the wrong statement :
a) TTL index is ideal for certain types of information like machine generated event data, logs, and session information that only need to persist in a database for a finite amount of time
b) You cannot combine the sparse index option with the unique index option
c) TTL indexes are special indexes that MongoDB can use to automatically remove documents from a collection after a certain amount of time
d) None of the mentionedView Answer

Answer: b
Explanation: You can combine to reject documents that have duplicate values for a field but ignore documents that do not have the indexed key.

6. The ______ property of an index ensures that the index only contain entries for documents that have the indexed field.
a) Hashed
b) Unique
c) Sparse
d) None of the mentionedView Answer

Answer: c
Explanation: The index skips documents that do not have the indexed field.

7. MongoDB can use the _________ of indexes to fulfill queries.
a) union
b) intersection
c) projection
d) none of the mentionedView Answer

Answer: b
Explanation: The $project takes a document that can specify the inclusion of fields, the suppression of the _id field, the addition of new fields, and the resetting the values of existing fields.

8. Which of the following method is to verify whether MongoDB used index intersection ?
a) explain()
b) analyze()
c) intersect()
d) none of the mentionedView Answer

Answer: a
Explanation: To determine if MongoDB used index intersection, run explain(); the results of explain() will include either an AND_SORTED stage or an AND_HASH stage.

9. An index prefix is a subset of a ______ index, consisting of one or more keys starting from the beginning of the index.
a) Hashed
b) Unique
c) Sparse
d) CompoundView Answer

Answer: d
Explanation: With index intersection, MongoDB can use an intersection of either the entire index or the index prefix.