sai-pullabhotla / catatumbo

JPA like Persistence Framework for Google Cloud Datastore and Cloud Firestore
http://catatumbo.io
Apache License 2.0
51 stars 20 forks source link

Simple Query Takes 12 seconds #218

Open zero-master opened 4 years ago

zero-master commented 4 years ago

I am not sure where's the problem, is it datastore or this library?

   public List<Campaign3> getLiveCampaignsForAccount(Long accountId) {
        EntityQueryRequest request = datastoreAdapter.getEm().createEntityQueryRequest("SELECT * FROM " + ENTITY_NAME + " WHERE accountId=@1 and live = @2");
        request.addPositionalBinding(accountId);
        request.addPositionalBinding(true);
        QueryResponse<Campaign3> response = datastoreAdapter.getEm().executeEntityQueryRequest(Campaign3.class, request);
        return response.getResults();
    }
sai-pullabhotla commented 4 years ago

Have you tried the query from GCP console? What was the result?