Query optimization for fraud rings matching

Could be the data, could be not enough RAM on the box ...

But your query is looking for a long chain not a ring!

Any ring loops back to the start for example, notice p1 at the start and at the end

match pathx=(p1:Person)--(c1:Claim)--(p2:Person)--(c2:Claim)--(p1)
return pathx