Hi ,
I started exploring the possibility of neo4j in our domain and as of now we are using community version .I am from the RDBMS background and this below question comes up everytime when i run the CYPHER .Your help will be greatly appreciated .Below is my simple SQL
neo4j> profile MATCH (origin:CS_LOCATION), (destination:CS_LOCATION)WHERE origin.location_id in[635] and destination.location_id in[1104642] return origin, destination;
+-------------------+----------------+------+---------+-----------+---------------------+---------------------------+
| Operator | Estimated Rows | Rows | DB Hits | Cache H/M | Identifiers | Other |
+-------------------+----------------+------+---------+-----------+---------------------+---------------------------+
| +ProduceResults | 625 | 1 | 0 | 0/0 | destination, origin | |
| | +----------------+------+---------+-----------+---------------------+---------------------------+
| +CartesianProduct | 625 | 1 | 0 | 0/0 | destination, origin | |
| |\ +----------------+------+---------+-----------+---------------------+---------------------------+
| | +NodeIndexSeek | 25 | 1 | 2 | 0/0 | destination | :CS_LOCATION(location_id) |
| | +----------------+------+---------+-----------+---------------------+---------------------------+
| +NodeIndexSeek | 25 | 1 | 2 | 0/0 | origin | :CS_LOCATION(location_id) |
+-------------------+----------------+------+---------+-----------+---------------------+---------------------------+
Here i am referencing CS_LOCATION twice and i have an index on location_id .The first read should be from the storage and a db hit .Is there anyway i can change the CYPHER to make the 2nd reference of CS_LOCATION from the cache since it is already selected from the first MATCH ?
Thanks in advance
Sojan