Hi all,
Neo4j 4.1 Community Edition
I am trying to get a better understanding of the terms inside the profile operators:
- Rows
- Estimated rows
- DB hits
- Cache hits
- Cache misses
- Memory
I understand (1) well enough, however I have trouble fully understanding (2-6).
For (2) Estimated rows, I don't understand how this is determined, i.e. the number of estimated rows. I also want to understand if it is always better to reduce this number or if there are any specific cases where that would be the exception?
For (3) DB hits, I understand that this refers to the number of database hits and that for tuning a query this number should be minimized. What I don't understand is why sometimes this value is higher/ lower in specific cases (assuming no indexes).
Example: I have created 5000 nodes, then when I try to match one of the nodes,
PROFILE MATCH (t:Test1)
WHERE t._uuid = 'test1'
RETURN t
I don't understand why there are 5001 db hits in the NodeByLabelScan, shouldn't this value by 5000? I also don't understand why there are 10000 db hits for filter?
For (4) Cache Hits, I rarely see this, I am not sure what are the circumstances to get this?
For (5) Cache Misses, I rarely see this and if I do I always get 0, which for tuning should always be the case. I want to understand if I do come across this problem, how would I solve/avoid it?
For (6) Memory, I understand for tuning this should be minimized. However, I am not sure what exactly affects memory (other than size of search) and how to accomplish minimizing this?
Thanks in advance.