Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-29-2021 08:12 PM
MATCH (:A)-[r]->(:A)
RETURN r.myProp as prop, count(r) as count
I'm wondering if there is a way to speed up this query. Currently with ~50 million relationships, it takes a long time.
11-30-2021 12:10 AM
Hi @mr.sheehan,
welcome to the community!
Depends on the structure of your graph. My first hint would be to add a type to the relationship, cause I assume myProp doesn't appear on all types of relationships but on one or only a few.
MATCH (:A)-[r:REL_TYPE]->(:A) ...
or, if more than one type is needed:
MATCH (:A)-[r:REL_TYPE1|RELTYPE2]->(:A) ...
Best,
Reiner
All the sessions of the conference are now available online