Cypher performance issue

We found a very strange thing, two cyphers.

  1. OPTIONAL MATCH (ele)-->(orphanNode) WHERE NOT (orphanNode)<-[*]-(:AssetArtifact)
  2. OPTIONAL MATCH (ele)-->(orphanNode) WHERE NOT (orphanNode)<-[*]-(:AssetArtifact)<--(arch)

Cypher #1, runs on the large data volume(more than 40K AssetArtifact nodes) neo4j DB, and the response is very fast(return in 1s). However, if it runs on less data volume (less than 10K AssetArtifact nodes) neo4j DB, and the response is very slow(more than 10s).

Cypher #2, runs on the large data volume(more than 40K AssetArtifact nodes) neo4j DB, and the response is very slow(more than 10s). However, if it runs on less data volume (less than 10K AssetArtifact nodes) neo4j DB, the response is very fast(return in 1s).

Is there any magic/balance number in the cypher execution, how could I resolve this kind of issue...