简体   繁体   English

GAE数据存储区获取时间是否太长?

[英]GAE datastore fetch taking too long?

I have a query which looks like this: 我有一个查询,看起来像这样:

userBase = UserEntry.all().filter('debug =', False).filter('disabled =', False).filter('first_message =', False).fetch(200)

And an index (built and serving) 和索引(已构建并正在投放)

 - kind: UserEntry   
   properties:
   - name: first_message
   - name: disabled
   - name: debug

There are around 1000 entries in UserEntry, and after filtering out - only 200 which are being fethed. 在UserEntry中大约有1000个条目,并且在过滤掉之后-只有200个条目被绑定。

The problem: 问题:

The aforementioned fetch, that single line of code, takes 1,5s to complete. 前面提到的提取(即一行代码)需要1.5秒才能完成。 Any ideas why this could be? 任何想法为什么会这样?

My guess is that there might be something wrong with the UserEntry model. 我的猜测是UserEntry模型可能有问题。 It has quite a few properties - but I don't know where to start looking.. 它具有很多特性-但我不知道从哪里开始寻找。

Your custom index appears to be in the wrong order; 您的自定义索引顺序似乎不正确; the query is most likely being done by a zigzag merge-join rather than using your custom index. 该查询最有可能是通过锯齿形合并联接而不是使用自定义索引来完成的。 Try filtering the properties in the same order they're in index.yaml . 尝试按属性在index.yaml中的顺序过滤属性。

提取次数太大,请尝试fetch(200)并查看花费了多长时间。

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

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