Are you sure the over quota is from the query. The delete will cause all indexes associated with the deleted entity to be updated. So that will be more likely the cause of the over quota.
To prove this run the same query without the delete ;-) T On Sunday, December 15, 2013 12:32:25 AM UTC+8, Lapteuh wrote: > > Hi all! > > Recently, I had to remove all entities of a certain type in the datastore. > There were ~10 000. I connected via Remote Api and executed the following > code: > > from model import MyEntityKind > > @ndb.toplevel > def delete_all(): > for key in MyEntityKind.query().iter(keys_only=True): > key.delete_async() > > > delete_all() > > And I get: > OverQuotaError: The API call datastore_v3.RunQuery() required more quota > than is available. > > And before to run code, small ops quota was zero. > > In the administrative console was specified, that ended quotas datastore > small operation. This behavior surprised me, because > documentation<https://developers.google.com/appengine/pricing?hl=ru&csw=1#Billable_Resource_Unit_Cost>specified > *Query > (keys only) — 1 read + 1 small per key retrieved*, and the query had to > spend 10 000 key = 1 read + 10 000 small! > > Perhaps this is a side effect of using Remote Api or bug! > > Thank you for your attention! > > P.S. Sorry for my bad english. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
