2010-07-20 64 views
0

我正試圖將應用部署到Google AppEngine。但DataStore索引建設似乎永遠存在。我的index.yaml的內容Google AppEngine索引延遲

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 

有關如何加速過程的任何想法?

回答

1

加速索引的唯一方法就是在數據較少時創建索引 - 儘管這會增加插入的額外開銷。除此之外,你必須讓自動系統儘可能快地構建索引。

+0

即使在數據存儲中沒有數據的情況下部署應用程序時,它也會花費很多時間爲索引提供服務。有任何想法嗎? – GeekTantra 2010-07-20 09:09:36

+1

索引構建隊列由所有應用程序共享,所以在繁忙時間,即使是空索引也需要一段時間才能構建。不過這應該不會有太大影響,因爲你應該只需要相對較少地建立新的索引。 – 2010-07-20 09:22:22