Get-by-key is a read operation, not a small operation. Small operations are things like count() index walks and keys-only queries (although there is still 1 read operation per query).
Most read-heavy apps can benefit significantly from memcache. If you're using the low-level api, try this: http://code.google.com/p/objectify-appengine/wiki/MemcacheStandalone Jeff On Wed, Apr 18, 2012 at 2:27 AM, cloudpre <[email protected]> wrote: > Hi > > We have a pretty big app which has not been optimized till date. We > spend over $40/day just on the reads. > > This is our current stats > > Datastore Read Operations 46.74 Million Ops 46.69 > $0.70/ Million > Ops $32.69 > Datastore Small Operations 0.00 Million Ops 0.00 > $0.10/ Million > Ops $0.00 > > > I have been reading that small operations are much cheaper and they > are done based on key. > > The following function is used at many places - but I do not see > counter moving from zero for small operations. > > Is datastore.get(key) a small operation? If not, what should I change > the function to make it count towards small operations. > > Thanks. > > // Get Entity > public static Entity getEntityFromId(String entityName, String id) > { > // Get Datastore > DatastoreService datastore = > DatastoreServiceFactory.getDatastoreService(); > > // Get Entity > try > { > Key key = KeyFactory.stringToKey(id); > return datastore.get(key); > } catch (Exception e) > { > return null; > } > } > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
