Views on Neo4j for efficient execution of Cypher queries

Hi,

Since there is no way to create and manipulate views under Neo4j, I have created two databases on the same project, one called AllData and the other one called CachedData. CachedData contains only few nodes and relationships (40K) while AllData contains 0.5 millions of nodes and 0.9 millions of relationships. In this was, CachedData playes role of a simple view. I was expecting that my cypher queries take less time in CachedData rather than AllData but the results are surprising: the execution time is almost the same over the two databases, and sometimes, CachedData makes queries take more time.

How can you explain this result ?

Hello @hm873154 ,

Do you have indexes defined the same for both graphs?

When you profile your queries, you must run them at least 2 times as the first run parses the query and stores the query in the query cache.

Do your queries return a lot of data? The elapsed time may be due to the streaming of returned data.

The db hits should be lower for the graph with fewer nodes/relationships. Is this not the case?