Which Neo4j version do you use?

In 2.3.+ you can use:

MATCH (n)
WITH n, size( (n)--() ) as degree
RETURN n ORDER BY degree DESC LIMIT 100


On Wed, Aug 10, 2016 at 8:33 AM, <[email protected]> wrote:

> Hi all,
> We have a graph database with 8 million nodes and 50 million
> relationships. We need to find out nodes with maximum relationships in
> descending order. The code
>
> start n=node(*)
> match (n)-[r]-()
> return n, count(r) as rel_count
> order by rel_count desc
> limit 25
>
> is taking a lot of time. Is there any way to do it quickly?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to