拥有大量属性的 App Engine 扩展模型是否会对性能产生负面影响?
我一直在应用程序中使用一种模式,在 App Engine 应用程序中的 Expando 类模型上设置任意属性。
这按预期工作,但尚未使用真正大的数据集进行测试。 随着时间的推移,属性的数量可能会变得 > 1000。
它还使管理控制台中的表滚动到最右侧,因为每个属性都需要一列。
我想,通过询问这个问题,我可以让自己和其他人免遭大皮塔饼的困扰。
I've been using a pattern in an application where I'm setting arbitrary attributes on Expando class models in an App Engine app.
This works as expected, but hasn't yet been tested with a really large data set. And over time, the number of attributes might get to be > 1000.
It also makes the table in the administration console scroll far to the right, since it needs a column for each attribute.
I figured I might save myself and others from a major pita by asking about this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只有设置了值的属性才会被索引。 当您尝试查找所有未设置姓氏的人员时,这可能是一个 PITA。 在您的情况下,虽然它的效果非常好 - 对于小型实体,更新索引会很快,但大型情况仍然是可能的。 请注意每个实体的索引条目上限 - 我认为现在是 5000。
Only properties that have values set to them will get indexed. This can be a PITA when you're trying to find all People without a LastName set. In your case though it works out perfectly - for small entities updating the indexes will be fast, but large cases will still be possible. Beware the upper limit on index entries per entity - I think it's 5000 right now.