【发布时间】:2018-05-12 06:56:15
【问题描述】:
我正在尝试按最常编写的模型的降序获取模型列表。 这是我到目前为止所尝试的。这个 client 查询集提供了模型及其属性/属性的详细信息,以及这些模型相关的详细信息: 实体计数、内置索引计数、内置索引大小、数据大小、复合索引大小、复合索引计数、总大小。但是没有关于写入频率和/或关于数据库 put() 或 save() 操作的任何分析的详细信息。
from google.cloud import datastore
import math
def run_quickstart():
# [START datastore_quickstart]
# Imports the Google Cloud client library
client = datastore.Client()
query = client.query(kind='__Stat_Kind__')
detail_list = []
items = list(query.fetch())
for results in items:
results = results.viewitems()
detail_list.append(results)
print detail_list
if __name__ == '__main__':
run_quickstart()
GAE Cloud Datastore 是否提供数据库写入频率的任何此类信息?我的主要目标是获得写入次数最多的最繁忙的模型/数据库表。
【问题讨论】:
标签: python google-app-engine google-cloud-datastore