The Data Engineering Show

Postgres vs. Elasticsearch: The Unexpected Winner in High-Stakes Search for Instacart with Ankit Mittal

Sep 17, 2025
Ankit Mittal, former Senior Engineer at Instacart and now at ParadeDB, shares his journey of enhancing search infrastructure by transitioning from Elasticsearch to PostgreSQL. He discusses the challenges of managing fast-moving grocery inventory and how consolidating search functions into one PostgreSQL cluster optimized performance. Ankit highlights the benefits of using PostgreSQL extensions for complex queries and the trade-offs between search systems, emphasizing improved efficiency and reduced latency in data retrieval.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Compute Close To The Data Wins Latency

  • Instacart consolidated search, ranking, filtering and availability into one Postgres cluster to avoid repeated network calls.
  • Pushing compute closer to data reduced pathological retries and improved latency.
INSIGHT

Retail Inventory Forces Different Tradeoffs

  • Grocery inventory changes extremely fast so many retrieved results must be filtered out.
  • This dynamic made repeated elasticsearch calls cause excessive latency and inefficiency.
ADVICE

Reduce Network Roundtrips By Collocating Data

  • Trade some specialized retrieval quality for fewer network round trips when availability is volatile.
  • Pack search, ranking, and filter data together so single queries return production-ready results.
Get the Snipd Podcast app to discover more snips from this episode
Get the app