So this recursive query, it takes 2 to 8 seconds, did I write it wrong?Or what can I do to make the query faster, how can I index it?
Tablets (14)
ugcId1.7GB
ugcUid1.2GB
rootUgcId1.1GB
forwardFrom1.0GB
forwardCount0.9GB
arith_name882.3MB
createTime826.5MB
isRoot651.5MB
isDeleted648.4MB
type607.7MB
query list(){
var(func:eq(ugcId, 28286941376)) @recurse(depth:100000, loop: false){
parentIds as ~forwardFrom
}
count(func:uid(parentIds)) @filter(lt(createTime,9223372036854775807 ) and eq(isDeleted,0)){
count(uid)
}
}
{
"data": {
"count": [
{
"count": 0
}
]
},
"extensions": {
"server_latency": {
"parsing_ns": 140776,
"processing_ns": 2214921716,
"encoding_ns": 77079,
"assign_timestamp_ns": 671889,
"total_ns": 2215862476
},
"txn": {
"start_ts": 179135227
},
"metrics": {
"num_uids": {
"": 0,
"_total": 0,
"createTime": 0,
"isDeleted": 0,
"ugcId": 0,
"~forwardFrom": 0
}
}
}
}