Q: When should or shouldn't I use graph queries?
There are configurations and situations for which graph querying is an optimal solution, and circumstances
that invite different approaches.
Q: What Are Hops And Paths?
In the context of graphs, the terms "hop" and "path" are often used to describe
the way and distance between data nodes. A hop is a direct jump from one node to
another, while a path is a sequence of hops between two nodes.
a two-hops Path
Graph queries and their results are often planned and evaluated in terms of paths.
A recursive query for example,
may locate paths to user profiles by various criteria.
Q: What Is The Flow Of Graph Queries?
There are two main phases to the flow of a graph query:
- Phase 1: Indexing
When a graph query is executed, RavenDB queries its data nodes first.
Resulting Lucene and Collection queries are indexed, and the indexes are used by the graph engine.
- Phase 2: Handling Relations
If the query includes edges, the graph engine uses them now to fathom relations between elements while
it goes through the indexes prepared during the first phase.