HydraDB vs Postgres
Postgres is where most teams build their first graph: recursive SQL for walks, pgvector for similarity, pgGraph for faster traversal. It holds up while relations live in your tables and questions have a known depth.
When the relationships agents need are scattered across Slack threads, docs and tickets and keep evolving, HydraDB can run alongside Postgres, bringing your tables and that scattered data into one knowledge graph.
Based on public docs and pricing as of Nov 2026. Something out of date? Suggest a correction →
How do teams build a graph on Postgres?
Recursive SQL for the walks. An edges table indexed both ways, plus WITH RECURSIVE and Postgres's built-in cycle check, answers "what's connected to this, and how far out?" Fixed-depth questions are a few joins, and the planner handles them well.
pgvector for similarity. Embeddings sit in the same tables as the rest of your data, so a similarity search can join, filter and run inside a transaction. It pairs with full-text search for hybrid search, and most hosted Postgres providers support it.
pgGraph for faster traversal. pgGraph reads your foreign keys and edge tables and compiles them into a compact graph index. Shortest path and traversal become SQL functions, and your tables stay the source of truth.
Together, these are the right call when the relations you need are already rows, the questions have a known depth, and the agent only needs the current state.
The friction shows up when the agent doesn't know how deep it needs to go, when the relations live outside your tables, or when it asks what changed.
The caveats worth knowing
Deep walks need caps, and the caps hide answers. Depth limits, neighbour limits and statement_timeout keep recursive queries alive. pgGraph stops a traversal at 100,000 nodes by default and flags it as capped. Whatever sits past the cap never comes back, and the agent answers from what did. On a 30.6M-edge graph, three hops from the most connected user reached about a million users, 63% of everyone. All of it runs on the database your app depends on.
The graph only knows what's in your tables. pgGraph and recursive SQL follow foreign keys and edge rows you wrote. A decision in a Slack thread or an owner named in a design doc isn't a row. pgvector can find text that reads like the question, but top-k returns look-alikes, not the ticket that shares an owner with it.
A row holds the latest value. An UPDATE overwrites what was there, and none of the three keeps history. If the agent needs to know what changed last week, you build the history tables and triggers, then query them yourself.
What changes with HydraDB?
Agent walks leave your primary. Postgres stays your system of record. Agent queries run on HydraDB, not on the database your app depends on, and compute scales separately from storage. Shortest and bounded paths are built in.
The graph builds from your sources, and keeps itself current. Your Postgres data and 100+ connected apps, like Slack, Gmail, Drive and Jira, feed one knowledge graph. Each source is turned into entities and relationships, structured to your ontology or one proposed for you.
As new data arrives, the graph updates incrementally and restructures when new kinds of facts appear, with no rebuild to run. Vector search, BM25 keyword search and graph traversal run in one query, so the agent gets the similar chunk and what it's connected to.
Agents can find what changed, when, and why. Every change to the graph is versioned like code in Git, with when, why and where it came from.
Technical comparison
| Recursive SQL | pgvector | pgGraph | HydraDB | |
|---|---|---|---|---|
| What it is | Walks relations with WITH RECURSIVE | Similarity search over embeddings | Graph index compiled from your tables | Graph infrastructure: storage, creation, evolution and retrieval |
| Storage | Edges table in your Postgres | Vector columns and HNSW or IVFFlat indexes in your Postgres | Graph index built from your tables, in the Postgres data directory | Written in Rust; the graph lives on object storage, with memory and NVMe as caches |
| Graph creation | Edges table you design and fill | None; similarity only | Foreign keys and edge tables you register, then graph.build() | From your Postgres data, 100+ app connectors, file uploads and the API, structured to your ontology or a proposed one |
| Keeping it current | Your writes | Your writes; re-embed when text changes | Triggers plus scheduled maintenance; some changes need a rebuild | Updates incrementally as data arrives and restructures when new kinds of facts appear |
| Retrieval | SQL | SQL with distance operators | SQL functions; Cypher- and GQL-shaped subsets | Vector, BM25 and graph traversal in one query; natural language or openCypher |
| Paths | Hand-written recursive queries | No | Shortest and weighted paths | Native shortest and bounded paths |
| Limits | Depth caps and statement_timeout you set | 2,000 dimensions indexed (4,000 with halfvec) | 100,000 nodes per traversal by default | Compute and storage scale separately |
| When a fact changes | New value replaces the old | New value replaces the old | Reads current table state | Every version kept, Git-style, with its source |
| Where it runs | Any Postgres | Most hosted Postgres providers | Postgres 14 to 18, self-installed, or Evokoa's Polygres | Managed, dedicated, your cloud, or self-hosted |
| License and cost | PostgreSQL License, part of your Postgres bill | PostgreSQL License, free | Apache-2.0, free | Elastic License 2.0; managed from $25/month: $0.70 per 1M tokens ingested, $0.50 per GB-month storage (pricing) |