How can I get the degree of every single node on Neo4j, and then find out which node has the biggest degree in a very huge graph (2 million nodes and 5 million relationships)?
I know I can use Cypher or Gremlin to achieve that, like:
start n = node(*)
match (n)--(c)
return n, count(*) as connections
order by connections dsec
or
g.V.bothE
but the RAM my computer have is only 2G~4G, I always wait for a long time and get "undefined" when I issue the query above..
does anyone have some experience on query such huge graph on neo4j with gremlin or cypher?