我正在尝试将应用部署到Google AppEngine。但DataStore索引构建似乎需要永远。我的index.yaml
的内容indexes:
# AUTOGENERATED
# This index.yaml is automatically updated whenever the dev_appserver
# detects that a new type of query is run. If you want to manage the
# index.yaml file manually, remove the above marker line (the line
# saying "# AUTOGENERATED"). If you want to manage some indexes
# manually, move them above the marker line. The index.yaml file is
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.
- kind: comments
properties:
- name: content_type_id
- name: is_public
- name: is_removed
- name: object_pk
- name: site_id
- name: created
- kind: comments
properties:
- name: content_type_id
- name: object_pk
- name: user_email
- name: user_name
- name: user_url
- name: created
- kind: content_type
properties:
- name: app_label
- name: name
- kind: pages
properties:
- name: post_status
- name: created
- kind: pages
properties:
- name: post_status
- name: post_title
- kind: posts
properties:
- name: post_status
- name: created
- kind: posts
properties:
- name: post_status
- name: created
direction: desc
关于如何加快这个过程的想法?
答案 0 :(得分:1)
加速索引的唯一方法是在数据量较少时创建索引 - 尽管这会对插入产生额外的开销。除此之外,您必须将其留给自动化系统以尽可能快地构建索引。