Anyone know a way I can profile my app to see where my datastore reads are coming from?
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/HohHHRXvFmUJ.
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.
Op 14 oktober 2011 06:43 heeft Rishi Arora <rishi...@ship-rack.com>
het volgende geschreven:
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
Google is able to tally the Datastore Read and Write Ops. Why is there
no API call that will return these numbers for the current request?
I have changed part of my application to construct and read an
aggregate object (containing the attributes of many small objects).
The result is that the number of Datastore Read Ops dropped
considerable. I'm still having a large number of Read Ops left and
have no idea which requests are responsible for the bulk of them.
It takes a long time to find the culprit because the billing stats
lags quit some time.
Op 15 oktober 2011 21:39 heeft Rishi Arora <rishi...@ship-rack.com>
het volgende geschreven:
Having a simple Model like this:
class Example(db.Model):
foo = db.StringProperty()
bars= db.ListProperty(str)
and 1000 entities in the datastore, I'm interested in the cost of these kind of operations:
entities_count = Example.all(keys_only = True).filter('bars=','spam').count()
entities_count = Example.all().count(10000)
entities = Example.all().fetch(10000)
entities = Example.all().filter('bars=','spam').filter('bars=','fu').fetch(10000)
entities = Example.all().fetch(10000, offset=500)
I build test cases for my codes subroutines and bench mark them. This is an important step in any Database testing. I have worked with organizations that had full time staff who sat around all day coming up with different ways to get the same query result and documenting, speed, load, disk access, and memory requirements.
Enable billing, run 1000 operations in a loop, look at your usage. Then do the same thing with which ever other ways you are considering implementing.
I often do these tests BEFORE picking a platform for deployment.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/xeuJzGl4jpYJ.
+ u'\ufffd'trick:
it probably has to scan and fetch all the entities to compare the strings, resulting in a high count of Datastore reads.
1.Query with offset on pagination: I use cursors of course but I gave the option to fallback to query with offset in case of cache-miss or direct access to a given page.
2.Filters that emulates the startwith function using the+ u'\ufffd'trick:
it probably has to scan and fetch all the entities to compare the strings, resulting in a high count of Datastore reads.