我刚开始使用 GAE 的搜索 API,我正在寻找相当于 SQL group by count 语句的功能。目前是否存在类似的情况?
2 回答
As @Daniel Roseman noted, GROUP BY does not apply for the full-text Search API.
On Datastore there is count (but it's very expensive) but no GROUP BY.
Google CLoud SQL: it's basically a managed MySql instance - both GROUP BY and COUNT are available.
Google Big Query is a distributed on-demand map-reduce system with SQL-like query language. It has both GROUP BY and COUNT. They are both expensive as queries are charged by rows x columns scanned (no indexes exist). BQ is very powerful (and fast) but exporting data to it from GAE is tedious as there is no direct API.
不,这根本不是它的用途。它是一个全文搜索 API,不支持分组或其他关系概念。