Here are some of the sample questions and answers on Performance in MongoDB.
1. How many indexes are allowed per collection in MongoDB?
a. 31
b. 32
c. 64
d. 60
2. Below operators are bad candidates for indexes? Choose all the possible answers.
a. $ne
b. $nin
c. $eq
d. $not
3. If an index is created on existing collection, it doesn't validate the already existing data.
a. True
b. False
4. Text indexes are sparse by default.
a. True
b. False
5. system.profile collection is a Capped collection.
a. True
b. False
6. Text indexes don't support compound indexes. They are always single field indexes.
a. True
b. False
7. Can we build multiple background indexes in parallel?
a. Yes
b. No
8. Can we have multiple foreground indexes building in parallel?
a. Yes
b. No
9. Point out the wrong statement
a. Query selectivity refers to how well the query predicate excludes or filters out documents in a collection
b. Query selectivity can determine whether or not queries can use indexes effectively or even use indexes at all
c. More selective queries match a larger percentage of documents
d. All of the mentioned
10. Point out the wrong statement
a. Multikey indexes are always single field indexes.
b. TTL indexes are always single field indexes.
c. Hash indexes doesn't support multi key indexes.
d. Multikey indexes can't be used for sharding.
Answers
-----------------
1. c
2. a,b,d
3. b
4. a
5. a
6. b
7. a
8. b
9. c
10. a
1. How many indexes are allowed per collection in MongoDB?
a. 31
b. 32
c. 64
d. 60
2. Below operators are bad candidates for indexes? Choose all the possible answers.
a. $ne
b. $nin
c. $eq
d. $not
3. If an index is created on existing collection, it doesn't validate the already existing data.
a. True
b. False
4. Text indexes are sparse by default.
a. True
b. False
5. system.profile collection is a Capped collection.
a. True
b. False
6. Text indexes don't support compound indexes. They are always single field indexes.
a. True
b. False
7. Can we build multiple background indexes in parallel?
a. Yes
b. No
8. Can we have multiple foreground indexes building in parallel?
a. Yes
b. No
9. Point out the wrong statement
a. Query selectivity refers to how well the query predicate excludes or filters out documents in a collection
b. Query selectivity can determine whether or not queries can use indexes effectively or even use indexes at all
c. More selective queries match a larger percentage of documents
d. All of the mentioned
10. Point out the wrong statement
a. Multikey indexes are always single field indexes.
b. TTL indexes are always single field indexes.
c. Hash indexes doesn't support multi key indexes.
d. Multikey indexes can't be used for sharding.
Answers
-----------------
1. c
2. a,b,d
3. b
4. a
5. a
6. b
7. a
8. b
9. c
10. a
No comments:
Post a Comment