I've spend alot of time profiling and optimizing my app. I've watched all the google io videos and done a ton of reading...
But there is one query I can't optimize away: SELECT * FROM USER_INVENTORY WHERE TUSER_ID=637 AND CATEGORY_ID=2752 ORDER BY ITEM_NUMBER ASC, ITEM_NAME, SUFFIX_NAME Yes there is a custom index for it It looks like a simple enough query, but it's taking the datastore 2.170703-1.863699 seconds to load and get about 500 records. The app engine translates 2 real seconds into 20 'processor seconds' and of course various quotas all go crazy. It's a simple list of a web stores items in a category any more than 50 or so and there is a noticeable delay. Why it it taking the datastore so long to return something like this? Entities seem to take forever to retrieve. Questions: I assume it's the number of returned entities here that causes the delay? E.G. The big penalty is for returning an entity not the query. Once you have a custom index the trailing ORDER BY items ITEM_NAME, SUFFIX_NAME don't matter much for speed since the key just gets a little longer. Do the number of properties on the entity matter much for query time? Is there some way to return JUST the properties I want? Whould that help for speed? Is there some way to get the just keys back from a query and memcache the objects? Though the queries are limited at 1,000 which is reasonable. The data store is so slow you can't get more than about 50 records on the screen at once. It seems like there is a fundamental limit, E.G. If you want a list of 500 items app engine just can't do it not matter what the technique. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
