Runtime and result issues executing star-shaped pattern

Hi Kees,
many thanks for your answer.
We use the Neo4j database for storing MDE models. Our goal was to validate a Matching after executing some graph transformations, but much faster than running a complete new Matching on the whole database. Therefore we want to use the MatchingNode pointing to the nodes of a Match.

Using the unique constraint does not make much difference. We had used an index on the MatchingNode UUID before. The executing-plan of your query was pretty much the same. The first execution needs around 6s, any further around 20ms. But why does it take so long first? Our model is very small.

In addition, our main problem is, sometimes the Neo4j finds a valid match, but sometimes it does not find a valid match using the same query. :face_with_raised_eyebrow:

Best regards,
Jannik