Skip to content

Commit 8f41971

Browse files
committed
update UDF in WHERE clause wording
1 parent 1ba8056 commit 8f41971

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Using UDFs, you can extend Azure Cosmos DB's query language. UDFs are a great wa
2121
However, we recommending avoiding UDFs when:
2222

2323
- An equivalent [system function](sql-query-system-functions.md) already exists in Azure Cosmos DB. System functions will always use fewer RU's than the equivalent UDF.
24-
- The UDF is in the `WHERE` clause of your query. UDF's do not utilize the index so evaluating the UDF will require loading documents.
24+
- The UDF is the only filter in the `WHERE` clause of your query. UDF's do not utilize the index so evaluating the UDF will require loading documents. Combining additional filter predicates that use the index, in combination with a UDF, in the `WHERE` clause will reduce the number of documents processed by the UDF.
2525

2626
If you must use the same UDF multiple times in a query, you should reference the UDF in a [subquery](sql-query-subquery.md#evaluate-once-and-reference-many-times), allowing you to use a JOIN expression to evaluate the UDF once but reference it many times.
2727

0 commit comments

Comments
 (0)