Skip to content

Commit 378b202

Browse files
authored
Merge pull request #106784 from timsander1/master
update info about optimizations to limit cross partition queries
2 parents 9475aad + fe096fe commit 378b202

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

articles/cosmos-db/sql-query-aggregates.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: Aggregate functions in Azure Cosmos DB
33
description: Learn about SQL aggregate function syntax, types of aggregate functions supported by Azure Cosmos DB.
4-
author: markjbrown
4+
author: timsander1
55
ms.service: cosmos-db
66
ms.topic: conceptual
7-
ms.date: 12/02/2019
8-
ms.author: mjbrown
7+
ms.date: 03/05/2020
8+
ms.author: tisande
99

1010
---
1111
# Aggregate functions in Azure Cosmos DB

articles/cosmos-db/sql-query-keywords.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Queries with an aggregate system function and a subquery with DISTINCT are not s
103103
SELECT COUNT(1) FROM (SELECT DISTINCT f.lastName FROM f)
104104
```
105105

106-
## <a name="in"></a> IN
106+
## IN
107107

108108
Use the IN keyword to check whether a specified value matches any value in a list. For example, the following query returns all family items where the `id` is `WakefieldFamily` or `AndersenFamily`.
109109

@@ -121,7 +121,9 @@ The following example returns all items where the state is any of the specified
121121
WHERE Families.address.state IN ("NY", "WA", "CA", "PA", "OH", "OR", "MI", "WI", "MN", "FL")
122122
```
123123

124-
The SQL API provides support for [iterating over JSON arrays](sql-query-object-array.md#Iteration), with a new construct added via the in keyword in the FROM source.
124+
The SQL API provides support for [iterating over JSON arrays](sql-query-object-array.md#Iteration), with a new construct added via the in keyword in the FROM source.
125+
126+
If you include your partition key in the `IN` filter, your query will automatically filter to only the relevant partitions.
125127

126128
## TOP
127129

articles/cosmos-db/sql-query-where.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn about SQL WHERE clause for Azure Cosmos DB
44
author: timsander1
55
ms.service: cosmos-db
66
ms.topic: conceptual
7-
ms.date: 02/03/2020
7+
ms.date: 03/06/2020
88
ms.author: tisande
99

1010
---
@@ -30,10 +30,11 @@ WHERE <filter_condition>
3030

3131
Expression representing the value to be computed. See [Scalar expressions](sql-query-scalar-expressions.md) for details.
3232

33-
3433
## Remarks
3534

36-
In order for the document to be returned an expression specified as filter condition must evaluate to true. Only Boolean value true will satisfy the condition, any other value: undefined, null, false, Number, Array, or Object will not satisfy the condition.
35+
In order for the document to be returned an expression specified as filter condition must evaluate to true. Only Boolean value `true` will satisfy the condition, any other value: undefined, null, false, Number, Array, or Object will not satisfy the condition.
36+
37+
If you include your partition key in the `WHERE` clause as part of an equality filter, your query will automatically filter to only the relevant partitions.
3738

3839
## Examples
3940

0 commit comments

Comments
 (0)