GAE的严重问题
在你动手开发GAE应用之前,最好先考虑下你的应用是否真的可以跑在GAE上,如果不仔细看它的开发手册,你很可能会漏掉一个严重的问题:
Inequality Filters Are Allowed On One Property Only
A query may only use inequality filters (<, <=, >=, >) on one property across all of its filters.
For example, this query is allowed:
select from Person where birthYear >= minBirthYearParam
&& birthYear <= maxBirthYearParam
However, this query is not allowed, because it uses inequality filters on two different properties in the same query:
select from Person where birthYear >= minBirthYearParam
&& height >= minHeightParam // ERROR
Filters can combine equal (==) comparisons for different properties in the same query, including queries with one or more inequality conditions on a property. This is allowed:
select from Person where lastName == lastNameParam
&& city == cityParam
&& birthYear >= minBirthYearParam
The query mechanism relies on all results for a query to be adjacent to one another in the index table, to avoid having to scan the entire table for results. A single index table cannot represent multiple inequality filters on multiple properties while maintaining that all results are consecutive in the table.
这个限制很直接,就是非等于的过滤条件只能应用到一个字段(属性)上,原来在关系型数据库上很简单的一些查询,到了GAE上就变得不可行了。
在开始开发GAE应用前,先考虑清楚你的应用是否会不可避免的碰到这个问题,或者是否可以放弃很多功能,看来便宜不是那么好占的。
作者: Cherami
原载: GAE的严重问题
版权所有。转载时必须以链接形式注明作者和原始出处及本声明。
日志评价
相关日志
随机日志
添加到网摘
[del.icio.us] [新浪 VIVI] [365key] [YouNote] [博采中心] [Poco] [SOHU狐摘] [天极网摘] [和讯网摘]喜欢这个插件?

该日志只有 1 条评论
发表评论 | RSS订阅 | 反向链接