
The infographic above summarizes our benchmarking framework, but the methodology deserves detailed explanation because how you measure determines whether you adopt graph technology or dismiss it prematurely. Most failed graph pilots benchmark the wrong workload.
1. Benchmarking Philosophy: Test the Workload, Not the Technology
We did not benchmark "graph database speed" in the abstract. We benchmarked specific treasury workloads that production cash management teams actually execute daily. This distinction matters because a graph database can be slower than PostgreSQL for simple account lookups—and that’s irrelevant if your bottleneck is 3-hop liquidity roll-ups.
The Five Benchmark Workloads
Each corresponds to one of the five query patterns from the previous article:
| Workload | Business Question | Why It Matters |
|---|---|---|
| Hierarchical Roll-Up | "What’s our weighted EUR liquidity?" | Daily LCR reporting requirement |
| Corridor Feasibility | "Can we sweep Shanghai → Singapore?" | Real-time funding decision |
| Contagion Mapping | "If Bank X fails, what’s our exposure?" | Stress testing & contingency planning |
| Drift Detection | "Which entities deviate from baseline?" | Fraud/operational risk monitoring |
| Compliance Gap Scan | "Who violates active policies?" | Regulatory audit defense |
2. Baseline Systems Tested
We compared against three production-representative alternatives—not strawmen:
Baseline A: Optimized PostgreSQL
Version 15 with recursive CTEs
Materialized views refreshed every 6 hours
Composite indexes on all join columns
Connection pooling via PgBouncer
This is what most treasuries actually run today
Baseline B: Vector RAG (Qdrant + GPT-4)
Chunked treasury policies and regulations
Hybrid search (dense + sparse embeddings)
Re-ranking with cross-encoder
This represents the "just use RAG" approach popular in 2024-2025
Baseline C: Dashboard ETL Pipeline
Pre-aggregated positions in Snowflake
Tableau/Looker dashboards refreshed on schedule
Manual drill-down for exceptions
This represents the status quo for 80% of corporate treasuries
3. Dataset Construction: Realistic Scale, Not Toy Data
Synthetic data was generated to mirror a mid-sized multinational:
Corporate Structure:
├── 1 Parent Holding Company
├── 47 Legal Entities across 23 jurisdictions
├── 312 Bank Accounts at 18 banks
├── 8 Cash Pools (mix of notional, physical, zero-balance)
└── Ownership percentages ranging from 51% to 100%
Transactional Volume:
├── 1,000,000 CashPosition snapshots (30-day history)
├── 250,000 PaymentInstruction records
├── 45 TreasuryPolicy documents (versioned)
└── 120 Regulation documents (ECB, PBOC, MAS, Fed, etc.)
Relationship Density:
├── Average 6.7 accounts per entity
├── Average 2.3 pool memberships per account
├── Average 4.1 regulatory constraints per jurisdiction corridor
└── Maximum ownership chain depth: 5 hopsCritical detail: We included "messy" real-world characteristics—minority-owned JVs, dormant accounts, superseded policies, missing historical positions—that break naive implementations.

4. Measurement Protocol
Latency Testing
Warm cache: All systems pre-loaded into memory
Cold start: First query after system restart
Concurrency: 200 simultaneous users (typical regional treasury team + automated jobs)
Iterations: 10,000 queries per workload, randomized parameters
Percentiles reported: p50, p95, p99 (not averages—averages hide tail latency)
Accuracy Testing
Ground truth: Manual treasury audit of 500 scenarios by certified professionals
Metrics: Precision, Recall, F1-Score for compliance violation detection
Hallucination rate: For RAG approaches, measured false citations of non-existent policies
Cost Testing
Infrastructure: AWS pricing (r6g.2xlarge for compute, io2 for storage)
Operational: Engineering hours for schema changes, index tuning, pipeline maintenance
Query cost: At 200 concurrent users, 8 hours/day, 250 days/year
5. Results: The Numbers Behind the Infographic
Hierarchical Liquidity Roll-Up (Pattern 1)
| System | p50 | p95 | p99 | Accuracy |
|---|---|---|---|---|
| PostgreSQL (Recursive CTE) | 8.2s | 47s | 118s | 100% |
| Vector RAG | N/A | N/A | N/A | 34% (hallucinated relationships) |
| Dashboard ETL | 0ms* | 0ms* | 0ms* | 100% (but 6h stale) |
| Neo4j Graph | 12ms | 16ms | 18ms | 100% |
*Dashboard returns cached value; actual refresh takes 6 hours.
Why graph wins: Index-free adjacency makes hop count irrelevant. PostgreSQL’s recursive CTE re-scans the entire ownership table at each recursion level. At 5 hops, this is O(n⁵) effectively.
Cross-Jurisdictional Sweep Feasibility (Pattern 2)
| System | p50 | p95 | p99 | Constraint Coverage |
|---|---|---|---|---|
| PostgreSQL (Multi-table JOIN) | 340ms | 1.2s | 3.8s | 73% (missed bilateral treaties) |
| Vector RAG | 890ms | 2.1s | 4.5s | 68% (missed numerical limits) |
| Manual Lookup | 15-45 min | — | — | 95% (human error) |
| Neo4j + Redis Cache | 6ms | 7ms | 8ms | 99.7% |
Why graph wins: Constraint intersection is a native graph operation. The query traverses source jurisdiction → constraints ← target jurisdiction in a single pattern match. SQL requires UNION of three separate queries plus application-layer deduplication.

Join the conversation! Your thoughts help the community grow.