GQL 是否支持常用的 SQL 样式聚合?
我正在寻找一个在 SQL 版本中广泛使用的简单聚合函数。
像 Select Count(*) from table1
这样的简单事情到更复杂的事情。
如果这些可用,您可以向我指出一些文档吗?
谢谢-吉吉
What I'm looking for a simple Aggregate Functions that are widely available in versions of SQL.
Simple things like Select Count(*) from table1
to the more complex.
If these are available, is there some documentation you could point me to?
Thanks - Giggy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SQL 聚合函数不可用。 您想要做的是遵循分片计数器示例等模式:http://code.google .com/appengine/articles/sharding_counters.html 解释了您希望在插入、更新或删除值时使计数器保持最新状态,而不是聚合查询中的值。
该示例将这个概念进一步深化,而不仅仅是维护聚合,因为它将解释如何制作它,以便您可以在高负载下更新计数器,而您写入计数器的机会有限 - 因此分片会有所帮助您将负载分布在多个实例上。
The SQL aggregate functions are not available. What you want to do is follow patterns like the sharded counters example: http://code.google.com/appengine/articles/sharding_counters.html which explain that instead of aggregating the values on queries, you want to keep the counters up to date when the values are inserted, updated, or deleted.
The example takes the concept a bit further than just maintaining the aggregates in that it will explain how to make it so that you can update the counters under high load where you have a limited amount of opportunity to write to your counters - so the shards help you distribute the load over several instances.
不,它根本不支持它们。
No, it doesn't support them at all.