The time it takes to run a query is generally a function of how many entities are returned. The reason for this is that queries happen like this:
- Parse the query and determine which indexes are needed to resolve which entities match this query - Using the indexes, determine which entities to query by key - Query the keys in parallel when possible When working with large number of entities, high level strategies are to: - compute the values you need on write - look into breaking the reporting into several background tasks. You can already use the task queue interface, but soon we will release a Mapper API that will allow you to map large datasets On Tue, May 25, 2010 at 9:59 PM, drift elysium <[email protected]>wrote: > hi all, > > I have a question about the querying large number of entities. I'm > using JPA and JPQL. > > When I deploy my application, it doesn't work when my query has a > large number of results in it. Looks like it might have timeout > issues. Also, the log looks like this: > > > 05-24 05:27PM 31.817 /computeIntersection 200 28933ms 15608cpu_ms > 7791api_cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: > 1.9.1.7) Gecko/20091221 Firefox/3.5.7 GTB6,gzip(gfe) > 69.154.53.31 - - [24/May/2010:17:28:00 -0700] "POST / > computeIntersection HTTP/1.1" 200 0 "http:// > edgeintersection.appspot.com/" "Mozilla/5.0 (Windows; U; Windows NT > 6.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 GTB6,gzip(gfe)" > "edgeintersection.appspot.com" > > E 05-24 05:28PM 00.687 > org.datanucleus.transaction.Transaction commit: Operation commit > failed on resource: > org.datanucleus.store.appengine.datastorexaresou...@1846d05, error > code UNKNOWN and transaction: [DataNucleus Transaction, ID=Xid= > > W 05-24 05:28PM 00.730 > > A serious problem was encountered with the process that handled this > request, causing it to exit. This is likely to cause a new process to > be used for the next request to your application. If you see this > message frequently, you may be throwing exceptions during the > initialization of your application. (Error code 104) > > > Is there an efficient way to perform JPQL query operation(even simple > query operation like selecting all the entities from the datastore) > for a large number of entities? > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- Ikai Lan Developer Programs Engineer, Google App Engine Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" 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-java?hl=en.
