- data prepare .
The dataset I use is the movie data showed in dgraph tours.
wget "https://github.com/dgraph-io/tutorial/blob/master/resources/1million.rdf.gz?raw=true" -O 1million.rdf.gz -q
dgraph live -r 1million.rdf.gz
- run query:
I found if both ofstarring
,actor.film
,performance.film
showed inshortest
function as bellow:
query x{
path as shortest(from: 0x138b3, to: 0x4, depth:2 ,numpaths: 2) {
actor.film
starring
performance.film
}
entity(func: uid(path)) {
uid
}
}
the CPU rise from 27% to 316%
and with no response
It looks like a Multiplicative relation
.
Is there any way to make it faster?