I have a pretty simple database query:
Query q = new Query("person"); q.addFilter("name", Query.FilterOperator.EQUAL, req.getParameter("n")); PreparedQuery pq = datastore.prepare(q); for (Entity result : pq.asList(FetchOptions.Builder.withDefaults())) {
Thus, he simply searches for all records for a given name. The name is not unique and contains a maximum of 16 characters. As far as I know, an index for short lines (<500 characters) is automatically generated.
The table has about 100,000 entries. A database query takes more than 8 seconds to retrieve all (about 10) objects.
The question is how to speed it up?
styrr source share