Home / Companies / FalkorDB / Blog / Post Details
Content Deep Dive

Shortest path at any distance: Dijkstra, A*, and CCH in FalkorDB

Blog post from FalkorDB

Post Details
Company
Date Published
Author
Gabriel Gomez and Roi Lipman
Word Count
2,258
Company Posts That Month
1
Language
English
Hacker News Points
-
Post removed?
No
Summary

FalkorDB compares Dijkstra, A*, and Customizable Contraction Hierarchies (CCH) for shortest-path routing on large graphs, focusing on a California road network with 1.25 million nodes and 3.06 million edges. Dijkstra reliably finds optimal paths without preprocessing but expands broadly and becomes slower and more memory-intensive over long distances, while A* uses admissible heuristics such as straight-line distance to direct its search and is often faster, though its performance can still degrade on long routes. CCH shifts most computation into a built-in index that ranks and contracts graph nodes into shortcut paths, allowing bidirectional upward searches that return routes in roughly 1 ms regardless of distance after an approximately five-second index build. The approach also supports rapid edge-weight updates for traffic or closures, although adding roads or nodes requires rebuilding the index. FalkorDB presents CCH as best suited to large, stable, frequently queried hierarchical networks, while Dijkstra remains appropriate for occasional or small-graph queries and A* for coordinate-based graphs with useful heuristics.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
RAG 1 371 102 56 -57%
Real-time 1 1,841 506 164 -62%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.