Operators are actions from the server. They are of several kinds and, to make a comparison, they are like CPU instructions. Some take longer to execute than others. As stated by Petra Selmer and Mark Needham, the operators to look for are as follows:
- All nodes scan
- Label scan
- Node index seek
- Node index scan
Obviously, scanning all the nodes is the most expensive operator, and the remaining ones become less and less expensive. Among the different possibilities to execute each analyzed query, the cost planner chooses the cheaper one.
For this goal, it uses statistics updated on each query execution. (The rule planner does not use these statistics.)
As query plans are cached, it would be better to use parameters instead of literals ...