输入RowSet.Rows不支持枚举器的多个实例. [英] Multiple instances of enumerators are not supported on input RowSet.Rows

查看:89
本文介绍了输入RowSet.Rows不支持枚举器的多个实例.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作用域脚本的我的XYZ.script.cs如下所示.编译正常,但运行时出现错误会失败

My XYZ.script.cs for the scope script looks like below. This compiles fine but fails while running with error

\"用户错误:输入RowSet.Rows不支持枚举器的多个实例.输入Rowset.Rows只能枚举一次.如果用户代码需要多次枚举,那么所有行必须在第一次通过时进行缓存 并在以后使用缓存的行.

\"User Error: Multiple instances of enumerators are not supported on input RowSet.Rows. The input Rowset.Rows may be enumerated only once. If user code needs to enumerate it multiple times, then all Rows must be cached during the first pass and use cached Rows later.

我不明白在第一遍中缓存是什么意思?

I do not understand what does it mean by caching in the first pass?


推荐答案

比贝克,

运行查询时,需要实现逻辑以在第一个查询上缓存所有文档URI,然后随后的每个遍历都将查询缓存,而不是直接读取特定分区.

When you run a query, you need to implement logic to cache all the document URIs on the first query and then each subsequent pass would instead, query the cache instead of a direct read of the specific partition.

"Cache document URIs whenever possible for the best read performance. You have to define logic to cache the resourceid when you create the resource. Resourceid based lookups are faster than name based lookups, so caching these values improves the performance."

请查看以下内容:性能提示适用于Azure Cosmos DB和.NET

此致

迈克


这篇关于输入RowSet.Rows不支持枚举器的多个实例.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆