inevolin/Postgres-FTS-TOASTed-vs-ElasticSearch: Benchmarking Postgres v18 for FTS with TOASTed JSONBs and GINs against ElasticSearch v8
github.com·4d·
Discuss: Hacker News
🗄Database Optimization
Preview
Report Post

Postgres (FTS+GIN+TOASTed) vs Elasticsearch: Performance Benchmark Analysis

This project benchmarks end-to-end full-text search over a document-shaped dataset using PostgreSQL 18 (built-in full-text search with a GIN index on a tsvector column) versus Elasticsearch.

Important scope note: these runs are intentionally designed to keep the PostgreSQL documents.data JSONB payload large enough to be TOASTed for most rows (out-of-line storage). That means results reflect “search + fetch document metadata from a TOAST-heavy table”, not a pure inverted-index microbenchmark.

📊 Executive Summary

Based on the latest committed benchmark artifacts in this repo (generated on 2026-01-06), we observed distinct performance profiles for each system:

  • **Small sca…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help