why Datastore Key Fetch Ops is so many?

173 views
Skip to first unread message

saintthor

unread,
Sep 13, 2011, 1:14:59 PM9/13/11
to Google App Engine
now, my quota:

Datastore Entity Fetch Ops
0%
0% 17,400 of Unlimited Okay
Datastore Entity Put Ops
0%
0% 136 of Unlimited Okay
Datastore Entity Delete Ops
0%
0% 0 of Unlimited Okay
Datastore Index Write Ops
0%
0% 240 of Unlimited Okay
Datastore Query Ops
0%
0% 343 of Unlimited Okay
Datastore Key Fetch Ops
0%
0% 208,358 of Unlimited Okay


Datastore Key Fetch Ops is much more than others. what may cause this?

Gregory D'alesandre

unread,
Sep 13, 2011, 1:51:34 PM9/13/11
to google-a...@googlegroups.com
Doing a count uses key fetch ops, is it possible you have a few counts in your code?

Greg


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.


JH

unread,
Sep 13, 2011, 2:28:29 PM9/13/11
to Google App Engine
Yes I found counts absolutely kill your small datastore ops. Of
course it has never been recommended to .count()... but if you are you
will not be able to stay in free quota...

On Sep 13, 12:51 pm, "Gregory D'alesandre" <gr...@google.com> wrote:
> Doing a count<http://code.google.com/appengine/docs/python/datastore/queryclass.htm...>

saintthor

unread,
Sep 13, 2011, 9:51:08 PM9/13/11
to Google App Engine
yes i use count.

what can instead it?

Gerald Tan

unread,
Sep 13, 2011, 11:10:23 PM9/13/11
to google-a...@googlegroups.com
Use an entity to store a running count, and increment it within a transaction.
If your application can write entities at > 5/s, you will need to use shard counters to get around the limit for an entity being modified.

saintthor

unread,
Sep 14, 2011, 12:54:04 PM9/14/11
to Google App Engine
of course i can store the number in my entity. also can store indexs.
but, is that so difficult for google to store a count value?

---how many people are there in USA?
---let me see, they are jim, bob, tom, mary....

Gerald Tan

unread,
Sep 14, 2011, 1:09:47 PM9/14/11
to google-a...@googlegroups.com
Count store is just not part of the NoSQL concept.
Reply all
Reply to author
Forward
0 new messages