google-app-engine - SDK 1.5.2 中的 "Advanced Query Planning"是否意味着我不再需要在 datastore-indexes.xml 文件中指定索引?

标签 google-app-engine google-cloud-datastore indexing

最新 App Engine 1.5.2 版本中宣布的“高级查询规划”有何实际效果?

Advanced Query Planning - We are removing the need for exploding indexes and reducing the custom index requirements for many queries. The SDK will suggest better indexes in several cases and an upcoming article will describe what further optimizations are possible.

如果我平时would define my indexes like so :

<?xml version="1.0" encoding="utf-8"?>
<datastore-indexes
  autoGenerate="true">
    <datastore-index kind="Employee" ancestor="false">
        <property name="lastName" direction="asc" />
        <property name="hireDate" direction="desc" />
    </datastore-index>

    <datastore-index kind="Project" ancestor="false">
        <property name="dueDate" direction="asc" />
    </datastore-index>
</datastore-indexes>

这个新的 SDK 更改是否意味着我不再需要包含此文件 - 并且 App Engine 运行时将自动找出需要哪些索引?

如果是这样,这听起来真的很酷!

最佳答案

没有。高级查询规划意味着 App Engine 运行时将能够更好地利用内置索引和复合(用户定义)索引来执行更广泛的查询。这可能意味着以前需要复合索引的一些查询现在可以在没有复合索引的情况下执行(会产生一些性能影响,这可能会或可能不重要,具体取决于您的情况),但这并不能消除对自定义索引的需要。

请留意近期包含详细信息的博客文章或文章。

关于google-app-engine - SDK 1.5.2 中的 "Advanced Query Planning"是否意味着我不再需要在 datastore-indexes.xml 文件中指定索引?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6792326/

相关文章:

python - 通过网页形式将图像上传到谷歌云存储Python,谷歌应用程序引擎,AngularJS

SQL Server - 使用 group by 聚合比没有聚合更快

python - 在 Python 中根据索引位置转换值

python - ComputedProperty 仅在第二次 put() 时更新

python - 谷歌应用程序引擎 - 数据存储过滤未按预期检索

python - 用第二个数组的两个值替换数组的数据

google-app-engine - Google App Engine 仅注销应用程序,而不是整个谷歌帐户

python - 如何使用 App Engine app.yaml 文件中定义的路由来提供来自 Google Cloud Storage 的内容?

python - 是否可以在应用程序中使用 X-AppEngine-Country

python - ndb.get_multi 返回 AssertionError