<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/rag-teams-ditch-vector-only-search-neo4j-cuts-text2sql-token-bills-k9zom51kv" -->

---
title: RAG teams ditch vector-only search, Neo4j cuts Text2SQL...
description: A RAG practitioner swapped a pure vector database for hybrid BM25-plus-reranker retrieval and saw accuracy jump hard while costs dropped 60%. A separate...
canonical: https://daily.dev/posts/rag-teams-ditch-vector-only-search-neo4j-cuts-text2sql-token-bills-k9zom51kv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: RAG teams ditch vector-only search, Neo4j cuts Text2SQL token bills | daily.dev
og:description: A RAG practitioner swapped a pure vector database for hybrid BM25-plus-reranker retrieval and saw accuracy jump hard while costs dropped 60%. A separate...
og:url: https://daily.dev/posts/rag-teams-ditch-vector-only-search-neo4j-cuts-text2sql-token-bills-k9zom51kv
og:image: https://api.daily.dev/og/posts/K9ZOM51KV.png
og:image:alt: RAG teams ditch vector-only search, Neo4j cuts Text2SQL token bills
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# RAG teams ditch vector-only search, Neo4j cuts Text2SQL token bills

**[Databases Digest](https://daily.dev/sources/databases_digest)** · 4 min read · 0 upvotes · 0 comments

## Summary

A RAG practitioner swapped a pure vector database for hybrid BM25-plus-reranker retrieval and saw accuracy jump hard while costs dropped 60%. A separate benchmark shows a Neo4j semantic layer cutting Text2SQL token spend up to 81% by letting agents retrieve only relevant schema instead of pasting whole catalogs into prompts. Trendyol shared war stories from migrating 2.24 billion documents off Couchbase onto Postgres, including a PgBouncer autoscaling bug that quietly multiplied connections to 3,000. A Postgres autovacuum incident is a good reminder that wraparound-prevention mode can't be killed, only worked around.

## Content

**TLDR:** A RAG practitioner swapped a pure vector database for hybrid BM25-plus-reranker retrieval and saw accuracy jump hard while costs dropped 60%. A separate benchmark shows a Neo4j semantic layer cutting Text2SQL token spend up to 81% by letting agents retrieve only relevant schema instead of pasting whole catalogs into prompts. Trendyol shared war stories from migrating 2.24 billion documents off Couchbase onto Postgres, including a PgBouncer autoscaling bug that quietly multiplied connections to 3,000. A Postgres autovacuum incident is a good reminder that wraparound-prevention mode can't be killed, only worked around.

---

## Hybrid BM25 + reranking beats pure vector search for RAG retrieval

A developer dropped Pinecone in favor of merging BM25 keyword search with embedding search via Reciprocal Rank Fusion, then reranking with a cross-encoder. On a 3,000-page technical corpus, retrieval accuracy went from 62% to 91%, answer correctness from 58% to 87%, and hallucination rate from 31% to 8%, while cutting infra costs 60%. Vector databases still earn their keep for exploratory search, multi-modal retrieval, and billion-document scale, but for most RAG setups this suggests the boring keyword-plus-rerank stack is the better default. [Read more](https://daily.dev/posts/mSJC5zPqK)

## A Neo4j semantic layer cuts Text2SQL token costs up to 81%

Instead of stuffing entire schemas into prompts, a graph-based semantic layer stores tables, columns, foreign keys, and embeddings, letting agents pull only what's relevant via semantic search and graph traversal for join paths. On a 278-table Census dataset, gpt-4o-mini went from 2/4 to 4/4 correct answers while using up to 81% fewer tokens; on a 264-table Databricks catalog, all eight tested Anthropic models hit 11/11 accuracy with 19-54% fewer tokens, saving an estimated $693-$1,527/month at 10K queries for Opus 4.5. Both benchmark repos are open-sourced, and the approach is pitched as sitting underneath metric-layer tools like dbt or Looker rather than replacing them. [Read more](https://daily.dev/posts/w7F20iAII)

## Trendyol migrated 2.24 billion documents from Couchbase to Postgres with zero downtime

The migration used dual-writes via Kafka, a custom CDC backfill tool, and feature-flagged cutover, but the real lessons are in the production incidents: a mysterious TPS spike traced back to PgBouncer's server_reset_query_always setting, a connection-limit incident that triggered a primary failover, and PgBouncer's own autoscaling multiplying backend connections to a theoretical 3,000 (20 pods times 150 default_pool_size). Final P50 latency stayed stable with only a brief P99 spike from 200ms to 400ms under peak load. If you're running PgBouncer behind an autoscaler, this is worth reading just for that connection-math gotcha. [Read more](https://daily.dev/posts/g6w06rUnd)

## Postgres autovacuum's wraparound-prevention mode can't be killed, only avoided

A production incident pinned CPU at 100% after xid_age crossed the freeze threshold and forced autovacuum into wraparound-prevention mode on a corrupted table. Terminating the process or disabling autovacuum doesn't stop this mode; the team had to temporarily raise autovacuum_freeze_max_age to exclude the table, clean up the corruption, then restore the setting. Worth bookmarking alongside the piece's other lock-contention scenarios: regular autovacuum's SHARE UPDATE EXCLUSIVE lock blocking ALTER TABLE, and long transactions preventing cleanup entirely. [Read more](https://daily.dev/posts/yHfszE20T)

---

## Also notable

- **SQLite as a vector store hits ~230ms per query at 150k vectors:** Benchmarking sqlite-vec against sqlite-vector shows comparable query speed at 150k vectors (~230ms), with sqlite-vector using quantization to speed up search rather than shrink disk footprint. [Read more](https://daily.dev/posts/fgpqZoo9p)
- **MCP Toolbox 1.9.0 adds text-to-vector search for ClickHouse, but only via Gemini:** Google's MCP Toolbox for Databases now embeds text and binds it as a raw vector for ClickHouse's cosineDistance and HNSW index with no custom embedding service, but Gemini is the only supported provider and embedded queries get inlined as literals in query_log rather than true prepared statements. [Read more](https://daily.dev/posts/T4oeTLVco)
- **Magento's review aggregation cron rescans the entire table every 15 minutes:** The aggregate_reviews cron does a full recompute on every run, and combined with N+1 summary queries on category pages, it's a hidden performance drain fixable with batched aggregation and composite indexes on the admin grid. [Read more](https://daily.dev/posts/MBQdnQ62a)
- **ProxySQL can run active/active HA via BGP ECMP instead of keepalived:** Assigning an anycast IP across ProxySQL nodes with a BGP daemon like ExaBGP lets a router withdraw routes to failed nodes automatically, though ECMP rehashing on topology changes resets existing TCP connections and forces reconnects. [Read more](https://daily.dev/posts/EykF9l3Mm)

## Similar posts on daily.dev

- [I Stopped Using Vector Databases. My RAG Got Better.](https://daily.dev/posts/i-stopped-using-vector-databases-my-rag-got-better--msjc5zpqk) · Medium · 0 upvotes · 0 comments
- [The laptop return that broke a RAG pipeline](https://daily.dev/posts/the-laptop-return-that-broke-a-rag-pipeline-nitroecfo) · The New Stack · 0 upvotes · 0 comments
- [Beyond the Vector Store: Building the Full Data Layer for AI Applications](https://daily.dev/posts/beyond-the-vector-store-building-the-full-data-layer-for-ai-applications-5nz7kmt0g) · Machine Learning Mastery · 1 upvotes · 0 comments

---

Tags: [#postgresql](https://daily.dev/tags/postgresql), [#rag](https://daily.dev/tags/rag), [#vector-search](https://daily.dev/tags/vector-search), [#neo4j](https://daily.dev/tags/neo4j)

[View this post on daily.dev](https://daily.dev/posts/rag-teams-ditch-vector-only-search-neo4j-cuts-text2sql-token-bills-k9zom51kv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/rag-teams-ditch-vector-only-search-neo4j-cuts-text2sql-token-bills-k9zom51kv","headline":"RAG teams ditch vector-only search, Neo4j cuts Text2SQL token bills","text":"A RAG practitioner swapped a pure vector database for hybrid BM25-plus-reranker retrieval and saw accuracy jump hard while costs dropped 60%. A separate benchmark shows a Neo4j semantic layer cutting Text2SQL token spend up to 81% by letting agents retrieve only relevant schema instead of pasting whole catalogs into prompts. Trendyol shared war stories from migrating 2.24 billion documents off Couchbase onto Postgres, including a PgBouncer autoscaling bug that quietly multiplied connections to 3,000. A Postgres autovacuum incident is a good reminder that wraparound-prevention mode can't be killed, only worked around.","url":"https://daily.dev/posts/rag-teams-ditch-vector-only-search-neo4j-cuts-text2sql-token-bills-k9zom51kv","datePublished":"2026-09-08T04:18:04.284Z","dateModified":"2026-09-13T21:20:49.560Z","author":{"@type":"Organization","name":"Databases Digest","logo":"https://media.daily.dev/image/upload/s--ir1hdV8b--/f_auto,q_auto/v1773839400/logos/databases_digest?_a=BAMAMiiu0","url":"https://daily.dev/sources/databases_digest"},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/databases_digest","name":"Databases Digest"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Databases Digest","item":"https://daily.dev/sources/databases_digest"},{"@type":"ListItem","position":3,"name":"RAG teams ditch vector-only search, Neo4j cuts Text2SQL token bills"}]}
```

