I realize that MATCH is used to find which paths to traverse and WHERE is used to filter them (presumably after they've been read from disk).
But I know work has also gone into optimizing the Cypher parser.
So is there any difference between these two queries:
START a=node(0)
MATCH a -[rel:FOO|BAR|BAZ]-> b
RETURN b
vs.
START a=node(0)
MATCH a -[rel]-> b
WHERE TYPE(rel) IS 'FOO' OR TYPE(rel) IS 'BAR' OR TYPE(rel) IS 'BAZ'
RETURN b
...? Or is one a best practice over the other?
I give this example specifically around multiple relationship types, but does it make a difference if there's just one vs. many?
(And if you need to check the target node type also, you of course have no choice but to put it in the WHERE.)
Thanks!
Aseem