I would like to query all the movies that actor_name is “dengchao” and the rate is greater than or equal to 7.0. However, total time spends about 800ms. It is very slow, what is the problem ? When I remove the filter function, total time spends only about 9ms.
This is hard to tell by a single query and schema. A real-world replication would be better.
See, in https://docs.dgraph.io/ we have a simple cluster configuration. And we can run all of the queries in the docs with millions of nquads. If you find a similar query in the documentation with the same problem. It would be easy for us to keep up.
What may be happening to you are numerous factors. I would recommend that you use Jaeger. To trace the source of the problem. Although a bit complicated, it is the best tool for finding bottlenecks and thus helping to better understand this problem.