Hi everybody,
I have a question concerning one of the questions during M103.
Given that I have a shard key like this:
{ "country": 1, "_id": 1 }
How come that this query is considered a targeted query?
db.customers.find({"country": { $gte: "Portugal", $lte: "Spain" }})
In my understanding, the query must contain both shard keys in the query in order to be considered a targeted query. But the given query contains the country only. Can somebody explain why this is considered targeted?
Thanks in advance!