Chapter 3 Lab: Detect Scatter Gather Queries

I believe that answer on the question as it formulated: Which of the following is required in order for a query to be targeted to a subset of shards? is wrong.
First answer: is correct, but second: “An index exists on the shard key” has nothing to do with query being targeted, since we don’t specify what kind of the query it is. It may not include shard key and thus can be scatter gather query. You provided this example in the lecture, when shard key is “sku”, index on “sku” exists and so on, but find(“name”: “xyz”) is not a target query. So existence of the index on shard key is not required for query to be targeted, it required for collection to be sharded.

1 Like

Hi @M_G,

Thanks for the feedback. Yeah, I think we can improve this lab. Thanks again fo surfacing this.

“An index exists on the shard key”. - It’s not a valid option.

Shard key can’t exist (can’t be created) without index being applied on that field already. So that’s doesn’t make any point.

Out of three option, The only correct option should be, “Query uses a Shard key”.