Reputation: 165
I have a simple query over a single indexed property and it fairly often takes more than 20 seconds, sometimes as much as 45 seconds. The Kind only has 10k entities and the query is returning about 110. Here is the query:
SELECT * FROM MyKind WHERE MyProperty = 'xyz'
Normally this only takes a few seconds (which still feels too long), but occasionally it takes a REALLY long time as described above.
The entities that are returned are not in an entity group, they are all their own root entity. Would this help if I put them into the same entity group? They are very related to each other, so it would make sense to change the data model this way.
Just wondering if the physical location of the entities is spread out as it is today and putting them into an entity group would keep them together and eliminate a bunch of rpc overhead.
Upvotes: 0
Views: 1117
Reputation: 2477
I invite you to check the best practices with Cloud Datastore. Hotspotting in Cloud Datastore can happen for many reasons:
For monitoring and to check for hotspotting I suggest you to use custom metrics in Stackdriver. Here are the available Datastore metrics. if you need more help, ping me.
Upvotes: 2