简体   繁体   English

Cloudant 查询性能是否受数据量变化的影响?

[英]Is Cloudant query performance affected by the volume of data change?

In a Cloudant database with data and some secondary indexes, is it possible for a working view to become inoperable due to incoming data?在具有数据和一些二级索引的 Cloudant 数据库中,工作视图是否可能由于传入数据而变得不可操作? I have a view that was previously working but people on my team began reporting timeouts.我有一个以前有效的视图,但我团队中的人开始报告超时。 When I use the Cloudant dashboard to query the view I see a message: Error running query. Reason: (timeout) The request could not be processed in a reasonable amount of time当我使用 Cloudant 仪表板查询视图时,我看到一条消息: Error running query. Reason: (timeout) The request could not be processed in a reasonable amount of time Error running query. Reason: (timeout) The request could not be processed in a reasonable amount of time . Error running query. Reason: (timeout) The request could not be processed in a reasonable amount of time

When I look at indexing tasks I see 11 indexing tasks at various states of completion, some as low as 26%.当我查看索引任务时,我看到 11 个索引任务处于不同的完成状态,有些低至 26%。

So is there a relation between query performance and the amount of data coming in?那么查询性能和传入的数据量之间有关系吗?

Yes, there is.就在这里。 If the database receives a bunch of new updates, inserts or deletes, then it updates the indexes asynchronously.如果数据库收到一堆新的更新、插入或删除,那么它会异步更新索引。 In other words, it accepts all the changes and a background process will start to refresh the indexes.换句话说,它接受所有更改,后台进程将开始刷新索引。 While the indexes are building, queries will be blocked (because the system is not strictly up to date).在建立索引时,查询将被阻止(因为系统不是严格最新的)。

In normal circumstances, this index update should at worst result in some slightly degraded query performance.在正常情况下,此索引更新最坏的结果应该是查询性能略有下降。 But if the influx of changes is large it could result in the timeouts described.但是,如果更改的涌入很大,则可能会导致所描述的超时。

If your application can tolerate getting stale results (ie ones that don't necessarily contain all the new data), you can issue your queries with a ?update=false parameter.如果您的应用程序可以容忍获得过时的结果(即不一定包含所有新数据的结果),您可以使用?update=false参数发出查询。 There is more information on that in this blog post 这篇博文中有更多相关信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM