Query Performance

I believe that for you what would matter most would be the insertion of data. That is, writing. Analyzing the performance for your tool by Query response does not have an optimal source for analysis. Unless you want query for thousands of data to be more important than saving them.

However, http://play.dgraph.io has a configuration much like yours. And running the query down I only had 6s of delay at the beginning. Then it went down to milliseconds.

{
  jcount(func: has(actor.film)){
    count(uid)
  }
}
#Server latency: 336ms

Also I would recommend that you review the indexing usage. You have 8 indexes and two @count. If you use all 8 predicates this can generate a bit of delay in writing. I would recommend that you consider a strategy for this. Indexing everything does not help in writing, but helps on reading.

I think (Just guessing here) the low performance may be due to recent heavy usage, multiple tasks running at the same time. In the “Play.Dgraph” example you just see up there. There are no mutations going on. Everything is consolidated.

In this way, I would also recommend you add more Alphas. Maybe more CPUs and a little more memory. The Play Dgraph uses 16GB of memory and 2CPUs. But no background working.

Dgraph Core team is working on it :wink: xD