Reputation: 346
Im trying to build a query that get all rows in datastore,but my problem is that i have hundreds of rows and when i try to run one time,i almost get limits quotas.. So my question is,what im doing wrong?
Query query = new Query(myObject);
PreparedQuery pq = datastore.prepare(query);
QueryResultList<Entity> results = pq.asQueryResultList(fetchOptions);
resp.setContentType("text/plain");
resp.getWriter().println(results.size());
for (Entity entity : results) {
resp.getWriter().println("entity.getProperty("name")");
Upvotes: 0
Views: 87
Reputation: 19854
What you have wrong is your algorithm. You cant do that with many rows since your frontend will timeout. Look at task queues and backends.
Upvotes: 1