Suggest more quickly count predicate total number

Hey, guys
The problem is when data size are too large the count predicate are get very slowly .
In my case , 0.65 Billion nodes , when I used count(uid) , the query speed is unbearable.
Can you add a variable to count separately and get total number by used complexity O(1) ?


curl -X POST -d '
    node(func: has(md5sha1)) {

Instead of using has() you can use can indexed function as the root func. There is also a count index that may be useful for you here.

Hey @dmai
The fact is I want all predicate numbers .
Maybe zero state are more suitable to show total numbers .

eg :

            "tablets": {
                "md5sha1": {
                    "groupId": 1, 
                    "predicate": "md5sha1", 
                    "space": "171416344634",
                    "count": "111111111"  // the total numbers