(Cosmos DB) 复合索引中的系统函数是范围过滤器?
(Cosmos DB) System functions in composite indexes are range filters?
Cosmos DB 文档说
Queries with multiple range filters can also be optimized with a
composite index. However, each individual composite index can only
optimize a single range filter. Range filters include >, <, <=, >=,
and !=. The range filter should be defined last in the composite
index.
系统函数呢?
例如,CONTAINS
、ARRAY_CONTAINS
、BETWEEN
...
官方文档并没有提到系统函数可以受益于复合索引。然后我测试这个。无论我是否使用复合索引,我得到的都是相同的RU/S。系统函数好像不能用复合索引。
已测试SQL:
SELECT * FROM c where c.age = 20 and (c.partitionkey between '1' and '5') and contains(c.data,'str') order by c.name desc
Cosmos DB 文档说
Queries with multiple range filters can also be optimized with a composite index. However, each individual composite index can only optimize a single range filter. Range filters include >, <, <=, >=, and !=. The range filter should be defined last in the composite index.
系统函数呢?
例如,CONTAINS
、ARRAY_CONTAINS
、BETWEEN
...
官方文档并没有提到系统函数可以受益于复合索引。然后我测试这个。无论我是否使用复合索引,我得到的都是相同的RU/S。系统函数好像不能用复合索引。
已测试SQL:
SELECT * FROM c where c.age = 20 and (c.partitionkey between '1' and '5') and contains(c.data,'str') order by c.name desc