Azure サブスクリプションをお持ちです。そのサブスクリプションには、account1 という名前の Azure Cosmos DB for NoSQL アカウントが含まれており、その中に Devices という名前のコンテナーがあります。Devices には type という名前のパーティション キーがあります。 あなたは以下のクエリを実行する予定です。 SELECT d.deviceName dから WHERE d.deviceId = 'ABC102' かつ d.type = 'car' かつ d.importanceId = 4 あなたはクエリのリソース使用率を評価しています。 クエリはどのように実行されますか?
正解:A
In Azure Cosmos DB, queries are optimized based on the partition key. Since the container Devices has a partition key named type, and the query includes the condition d.type = 'car', the query can be executed within a single partition (an in-partition query). This is because the type field is specified, which allows Cosmos DB to directly target the partition containing the documents with type = 'car'. Given that the query is restricted to a specific partition (i.e., type = 'car'), Cosmos DB does not need to scan across all partitions. The query will be executed efficiently within the specified partition, even though it includes other conditions (like d.deviceId = 'ABC102' and d.importanceId = 4), because those are additional filters within the targeted partition.