Skip to content

Commit 3f00534

Browse files
committed
update aggregate query examples
1 parent d5246fd commit 3f00534

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

articles/cosmos-db/troubleshoot-query-performance.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -219,29 +219,23 @@ SELECT COUNT(1) FROM c WHERE CONTAINS(c.description, "spinach")
219219
Query with both equality filter and `CONTAINS` filter - lower RU charge:
220220

221221
```sql
222-
SELECT AVG(_ts) FROM c WHERE c.foodGroup = "Sausages and Luncheon Meats" AND CONTAINS(c.description, "spinach")
222+
SELECT AVG(c._ts) FROM c WHERE c.foodGroup = "Sausages and Luncheon Meats" AND CONTAINS(c.description, "spinach")
223223
```
224224

225-
#### Here are additional examples of aggregates queries that will not fully use the index:
226-
227-
#### Aggregate queries with inequality filters
228-
229-
```sql
230-
SELECT COUNT(1) FROM c WHERE c.description != "Malabar spinach, cooked"
231-
```
225+
Here are additional examples of aggregates queries that will not fully use the index:
232226

233227
#### Queries with system functions that don't use the index
234228

235-
You should refer to the specific system function's page to see if it uses the index.
229+
You should refer to the specific [system function's page](sql-query-system-functions.md) to see if it uses the index.
236230

237231
```sql
238-
SELECT MAX(_ts) FROM c WHERE CONTAINS(c.description, "spinach")
232+
SELECT MAX(c._ts) FROM c WHERE CONTAINS(c.description, "spinach")
239233
```
240234

241235
#### Aggregate queries with user-defined functions(UDF's)
242236

243237
```sql
244-
SELECT AVG(_ts) FROM c WHERE MyUDF("Sausages and Luncheon Meats")
238+
SELECT AVG(c._ts) FROM c WHERE MyUDF("Sausages and Luncheon Meats")
245239
```
246240

247241
#### Queries with GROUP BY

0 commit comments

Comments
 (0)