Skip to content

Commit 38ad4fa

Browse files
authored
Merge pull request #160085 from timsander1/master
add new system function indexing docs
2 parents fb614d9 + edce08b commit 38ad4fa

File tree

3 files changed

+33
-35
lines changed

3 files changed

+33
-35
lines changed

articles/cosmos-db/sql-query-mathematical-functions.md

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: ginamr
55
ms.service: cosmos-db
66
ms.subservice: cosmosdb-sql
77
ms.topic: conceptual
8-
ms.date: 09/13/2019
8+
ms.date: 05/26/2021
99
ms.author: girobins
1010
ms.custom: query-reference
1111
---
@@ -28,35 +28,33 @@ The result is:
2828

2929
## Functions
3030

31-
The following supported built-in mathematical functions perform a calculation, usually based on input arguments, and return a numeric expression:
31+
The following supported built-in mathematical functions perform a calculation, usually based on input arguments, and return a numeric expression. The **index usage** column assumes, where applicable, that you're comparing the mathematical system function to another value with an equality filter.
3232

33-
* [ABS](sql-query-abs.md)
34-
* [ACOS](sql-query-acos.md)
35-
* [ASIN](sql-query-asin.md)
36-
* [ATAN](sql-query-atan.md)
37-
* [ATN2](sql-query-atn2.md)
38-
* [CEILING](sql-query-ceiling.md)
39-
* [COS](sql-query-cos.md)
40-
* [COT](sql-query-cot.md)
41-
* [DEGREES](sql-query-degrees.md)
42-
* [EXP](sql-query-exp.md)
43-
* [FLOOR](sql-query-floor.md)
44-
* [LOG](sql-query-log.md)
45-
* [LOG10](sql-query-log10.md)
46-
* [PI](sql-query-pi.md)
47-
* [POWER](sql-query-power.md)
48-
* [RADIANS](sql-query-radians.md)
49-
* [RAND](sql-query-rand.md)
50-
* [ROUND](sql-query-round.md)
51-
* [SIGN](sql-query-sign.md)
52-
* [SIN](sql-query-sin.md)
53-
* [SQRT](sql-query-sqrt.md)
54-
* [SQUARE](sql-query-square.md)
55-
* [TAN](sql-query-tan.md)
56-
* [TRUNC](sql-query-trunc.md)
57-
58-
59-
All mathematical functions, except for RAND, are deterministic functions. This means they return the same results each time they are called with a specific set of input values.
33+
| System function | Index usage | [Index usage in queries with scalar aggregate functions](index-overview.md#index-utilization-for-scalar-aggregate-functions) | Remarks |
34+
| ------------------------------- | ----------- | ------------------------------------------------------ | ------------------------------------------------------------ |
35+
| [ABS](sql-query-abs.md) | Index seek | Index seek | |
36+
| [ACOS](sql-query-acos.md) | Full scan | Full scan | |
37+
| [ASIN](sql-query-asin.md) | Full scan | Full scan | |
38+
| [ATAN](sql-query-atan.md) | Full scan | Full scan | |
39+
| [ATN2](sql-query-atn2.md) | Full scan | Full scan | |
40+
| [CEILING](sql-query-ceiling.md) | Index seek | Index seek | |
41+
| [COS](sql-query-cos.md) | Full scan | Full scan | |
42+
| [COT](sql-query-cot.md) | Full scan | Full scan | |
43+
| [DEGREES](sql-query-degrees.md) | Index seek | Index seek | |
44+
| [EXP](sql-query-exp.md) | Full scan | Full scan | |
45+
| [FLOOR](sql-query-floor.md) | Index seek | Index seek | |
46+
| [LOG](sql-query-log.md) | Full scan | Full scan | |
47+
| [LOG10](sql-query-log10.md) | Full scan | Full scan | |
48+
| [PI](sql-query-pi.md) | N/A | N/A | PI () returns a constant value. Because the result is deterministic, comparisons with PI() can use the index. |
49+
| [POWER](sql-query-power.md) | Full scan | Full scan | |
50+
| [RADIANS](sql-query-radians.md) | Index seek | Index seek | |
51+
| [RAND](sql-query-rand.md) | N/A | N/A | Rand() returns a random number. Because the result is non-deterministic, comparisons that involve Rand() cannot use the index. |
52+
| [ROUND](sql-query-round.md) | Index seek | Index seek | |
53+
| [SIGN](sql-query-sign.md) | Index seek | Index seek | |
54+
| [SIN](sql-query-sin.md) | Full scan | Full scan | |
55+
| [SQRT](sql-query-sqrt.md) | Full scan | Full scan | |
56+
| [SQUARE](sql-query-square.md) | Full scan | Full scan | |
57+
| [TAN](sql-query-tan.md) | Full scan | Full scan | |
6058

6159
## Next steps
6260

articles/cosmos-db/sql-query-string-functions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: timsander1
55
ms.service: cosmos-db
66
ms.subservice: cosmosdb-sql
77
ms.topic: conceptual
8-
ms.date: 05/04/2021
8+
ms.date: 05/26/2021
99
ms.author: tisande
1010
ms.custom: query-reference
1111
---
@@ -16,9 +16,9 @@ The string functions let you perform operations on strings in Azure Cosmos DB.
1616

1717
## Functions
1818

19-
The following scalar functions perform an operation on a string input value and return a string, numeric, or Boolean value:
20-
21-
| System function | Index usage | Index usage in queries with [scalar aggregate functions](index-overview.md#index-utilization-for-scalar-aggregate-functions) | Remarks |
19+
The below scalar functions perform an operation on a string input value and return a string, numeric, or Boolean value. The **index usage** column assumes, where applicable, that you're comparing the string system function to another value with an equality filter.
20+
21+
| System function | Index usage | [Index usage in queries with scalar aggregate functions](index-overview.md#index-utilization-for-scalar-aggregate-functions) | Remarks |
2222
| ----------------------------------------------- | ------------------ | ------------------------------------------------------ | ------------------------------------------------------------ |
2323
| [CONCAT](sql-query-concat.md) | Full scan | Full scan | |
2424
| [CONTAINS](sql-query-contains.md) | Full index scan | Full scan | |

articles/cosmos-db/sql-query-type-checking-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: timsander1
55
ms.service: cosmos-db
66
ms.subservice: cosmosdb-sql
77
ms.topic: conceptual
8-
ms.date: 05/04/2021
8+
ms.date: 05/26/2021
99
ms.author: tisande
1010
ms.custom: query-reference
1111
---
@@ -16,7 +16,7 @@ The type-checking functions let you check the type of an expression within a SQL
1616

1717
## Functions
1818

19-
The following functions support type checking against input values, and each return a Boolean value:
19+
The following functions support type checking against input values, and each return a Boolean value. The **index usage** column assumes, where applicable, that you're comparing the type checking functions to another value with an equality filter.
2020

2121
| System function | Index usage | [Index usage in queries with scalar aggregate functions](index-overview.md#index-utilization-for-scalar-aggregate-functions) | Remarks |
2222
| ----------------------------------------- | ----------- | ------------------------------------------------------------ | ------- |

0 commit comments

Comments
 (0)