{
  "version": "https://jsonfeed.org/version/1",
  "title": "Postgres on LLBBL Blog",
  "icon": "https://avatars.micro.blog/avatars/2023/40/125738.jpg",
  "home_page_url": "https://llbbl.blog/",
  "feed_url": "https://llbbl.blog/feed.json",
  "items": [
      {
        "id": "http://llbbl.micro.blog/2026/04/26/pgvector-vs-sqlitevec-you-probably.html",
        "title": "pgvector vs sqlite-vec: You Probably Don't Need Postgres",
        "content_html": "<p>Whenever I start looking into vector search, I always end up finding information on pgvector. It&rsquo;s totally worth considering, especially if you already have Postgres. But there are situations where it might be overkill. And in those situations, <code>sqlite-vec</code> (the successor to <code>sqlite-vss</code>) is quietly becoming the better answer.</p>\n<h2 id=\"when-sqlite-wins\">When SQLite Wins</h2>\n<p><strong>Local-first apps and CLI tools.</strong> If your thing runs entirely on a user&rsquo;s machine, a personal knowledge base plugin, a developer CLI, a desktop app, running a full Postgres instance is a huge ask. <code>sqlite-vec</code> gives you a vector store as a single <code>.db</code> file sitting next to your markdown or code. Zero configuration. No background daemon. No port management. It&rsquo;s just <em>there</em>.</p>\n<p><strong>Edge computing.</strong> On Cloudflare Workers or Vercel Edge Functions, cold starts matter. Establishing a connection to a remote Postgres database, even with a connection pooler, adds latency you feel. SQLite can be bundled with your app or mounted as a local read-only resource. Near-instant access to embeddings.</p>\n<p><strong>Testing.</strong> Spinning up a Postgres container just to verify your vector search logic adds seconds to every test run. With <code>sqlite-vec</code>, you initialize an in-memory database, run your tests, and discard it in milliseconds. If you care about fast inner loops, might be the right solution.</p>\n<p><strong>Single-user scenarios.</strong> Building a personal RAG system for your own research? A private publishing pipeline? The complexity of managing Postgres users, permissions, and backups is unnecessary. A single file on disk is easier to back up (just copy it) and easier to reason about.</p>\n<h2 id=\"the-actual-trade-offs\">The Actual Trade-offs</h2>\n<p>There are real differences and here is what I found.</p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">Feature</th>\n<th style=\"text-align:left\"><code>sqlite-vec</code></th>\n<th style=\"text-align:left\"><code>pgvector</code></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><strong>Deployment</strong></td>\n<td style=\"text-align:left\">Library (embedded)</td>\n<td style=\"text-align:left\">Server (process/container)</td>\n</tr>\n<tr>\n<td style=\"text-align:left\"><strong>Configuration</strong></td>\n<td style=\"text-align:left\">Zero</td>\n<td style=\"text-align:left\">High</td>\n</tr>\n<tr>\n<td style=\"text-align:left\"><strong>Portability</strong></td>\n<td style=\"text-align:left\">Single file</td>\n<td style=\"text-align:left\">Database dump/restore</td>\n</tr>\n<tr>\n<td style=\"text-align:left\"><strong>Concurrency</strong></td>\n<td style=\"text-align:left\">One writer</td>\n<td style=\"text-align:left\">Multi-user</td>\n</tr>\n<tr>\n<td style=\"text-align:left\"><strong>Ecosystem</strong></td>\n<td style=\"text-align:left\">Focused vector ops</td>\n<td style=\"text-align:left\">Full relational SQL</td>\n</tr>\n</tbody>\n</table>\n<p><code>pgvector</code> has better memory management, using the Postgres buffer cache and background workers. <code>sqlite-vec</code> runs in-process, so a large vector index competes directly with your application&rsquo;s memory. And Postgres has decades of refinement on indexing strategies, JSONB joins, and all the relational features you&rsquo;d expect.</p>\n<p>If you&rsquo;re not using those features, you&rsquo;re paying for complexity you don&rsquo;t need. If you prefer lightweight tools over heavy infrastructure, <code>sqlite-vec</code> just gets out of the way. There&rsquo;s no <code>docker compose</code> file required to start your day. The database is just there when your binary runs.</p>\n<h2 id=\"pick-the-right-one\">Pick the Right One</h2>\n<p>The decision is probably easier than you would think.</p>\n<p>If you have multiple users writing concurrently, need complex relational queries alongside your vectors, or are already running Postgres, use <code>pgvector</code>. It&rsquo;s battle-tested and the ecosystem is deep.</p>\n<p>If you&rsquo;re building something local-first, single-user, edge-deployed, or just want fast tests without container overhead, reach for <code>sqlite-vec</code>. You&rsquo;ll spend less time on infrastructure and more time on the actual problem.</p>\n<p>Not every vector search needs a database server.</p>\n<p>I&rsquo;d appreciate a follow. You can subscribe with your email below. The emails go out once a week, or you can find me on Mastodon at <a href=\"https://micro.blog/llbbl?remote_follow=1\">@logan@llbbl.blog</a>.</p>\n",
        "date_published": "2026-04-26T10:00:00-05:00",
        "url": "https://llbbl.blog/2026/04/26/pgvector-vs-sqlitevec-you-probably.html",
        "tags": ["Sqlite","Development","Postgres","Vector-search","Pgvector"]
      }
  ]
}
