Enaho Murphy

Co-founder & CTO · Pradini · Lagos

Drawn 2013–2026

Logbook · Entry 004

Postgres over a graph DB for warm introductions

Entry

If you describe the problem out loud, it sounds like it needs a graph database.

At Findem, after it acquired Getro in November 2025, I built the relationship graph behind warm introductions. The job: across millions of contacts, find the warmest path from you to the person you want to meet. You know someone, who worked with someone, who knows them. People, connections, paths. That’s a graph problem in every textbook.

We used Postgres for three reasons: it was simpler, running two databases costs more than running one, and the results needed filters that have nothing to do with graphs. Speed wasn’t one of the reasons. That came later, from better queries: depth-3 path search went from slow to almost instant. Here’s how that decision got made, and what it cost.

Take the exciting option seriously

I didn’t want to dismiss the graph database because it was new to the stack. That’s as lazy as picking it because it’s exciting. So I compared them properly: graph databases on one side, plain Postgres on the other, against the queries we actually had to run.

The comparison asked three questions.

What does the load actually look like? Not what it might look like one day. What it looks like now, and what it will plausibly look like next year.

Where does the data already live? Contacts, companies, work history, emails. All of it was already in Postgres, next to everything else the product used.

What does each option cost to run? Not just the licence or the server. Another system to deploy, to back up, to keep in sync, to page someone about at night.

Design for the load you have · not every load you can imagine.

Why Postgres won

The graph database would have made the path queries easier to write. It lost on three counts.

1. Simplicity

Postgres already had the data. We weren’t running open-ended graph analytics. We were answering one question, over and over: what are the best few paths from this person to that one, within a handful of hops?

That’s a bounded question. Bounded questions are what a relational database is good at, if you shape the data for them. One database, one set of tools, one thing for the team to understand.

2. The cost of two databases

A graph database would have meant copying millions of contacts into a second system and keeping them in sync forever. Every contact import, every job change, every merge of duplicate people would have to land in two places. That sync is where bugs live.

And the second system has its own bill: another thing to deploy, back up, upgrade, monitor and page someone about at night. For a small team, that running cost lasts for the life of the product.

3. The filters aren’t graph-shaped

Finding a path was never the whole query. People want paths to someone at a particular company, in a particular role, in a particular city. Those filters are plain relational questions, and Postgres already answers them well. In a graph database we’d have ended up joining back to Postgres for them anyway.

Shaping the data

The core is a single edge table. Each row is a connection between two contacts. Connections are built from work overlap: two people at the same company at the same time. Building that table meant a backfill across every organisation’s contacts, streamed with a cursor, logged per organisation so we could see progress, and run as batched background jobs, one organisation at a time.

Path search walks those edges up to four hops, using recursive queries in plain SQL.

The first version was slow at depth 3. The fix wasn’t a new database. It was two unglamorous things: covering indexes, so each step of the walk could be answered from the index alone, and a query rewrite built on UNION ALL. Together they made depth-3 search almost instant, on the same database.

Slow to almost instant · depth-3 path search, same database. Covering indexes and a query rewrite.

Scoring the path, not just finding it

Finding a path is half the job. The other half is knowing whether it’s any good. A path through someone you met once is worth less than a path through a former teammate.

So every connection gets a relationship-strength score, built from signals like when a LinkedIn connection was made, whether two people share email history, and how much their work and education overlap. The scores roll up into four strength buckets that people see in Intro Paths, so a member can pick the path most likely to get a reply.

That scoring lives next to the graph, in the same database. Another reason I was glad not to split it across two systems.

What it cost

This wasn’t free, and I wrote the cost down with the decision.

Postgres has no native graph queries. Every path query is hand-tuned. When someone wants a new kind of search, they can’t write a three-line graph query and ship it. They write SQL, check the plan, and add an index if it needs one.

That’s a real tax. I decided it was a smaller tax than running and syncing a second database for the life of the product. If the questions ever stop being bounded, the decision should be reopened. The written reason is where that argument starts.

Write the reason down

That’s the part I’d keep even if the comparison had gone the other way. A decision like this gets questioned every time someone new joins, or every time a query is slow. Without a written reason, the team argues from scratch.

With one, the argument starts from what we knew, what we measured, and what would change our minds.

Design for the load you have. Test the exciting option properly. Then write down why you picked the boring one.

Drafted with agents from my notes; edited and signed by me.

Rev A · 2026-09-28Signed · EM

Follow the Logbook: RSS