GQL是否支持常用的SQL风格聚合? [英] Does GQL support commonly available SQL Style aggregation?

查看:104
本文介绍了GQL是否支持常用的SQL风格聚合?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个在SQL版本中广泛使用的简单聚合函数。

简单的事情如从表格1 选择计数(*)到更复杂的。



如果这些可用,是否有一些文件可以指向我?

谢谢 - Giggy

解决方案

SQL聚合函数不可用。您要做的是遵循分片计数器示例的模式: http://code.google .com / appengine / articles / sharding_counters.html ,它解释了不是汇总查询中的值,而是希望在插入,更新或删除值时使计数器保持最新。



这个例子使得这个概念比维持聚合更深入一点,它将解释如何使它成为可以在高负载情况下更新计数器,写入你的计数器 - 所以碎片可以帮助你分配多个实例的负载。


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

解决方案

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.

这篇关于GQL是否支持常用的SQL风格聚合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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