<rss version="2.0">
  <channel>
    <title>Vector-search on LLBBL Blog</title>
    <link>https://llbbl.blog/categories/vector-search/</link>
    <description></description>
    
    <language>en</language>
    
    <lastBuildDate>Sun, 26 Apr 2026 10:00:00 -0500</lastBuildDate>
    
    <item>
      <title>pgvector vs sqlite-vec: You Probably Don&#39;t Need Postgres</title>
      <link>https://llbbl.blog/2026/04/26/pgvector-vs-sqlitevec-you-probably.html</link>
      <pubDate>Sun, 26 Apr 2026 10:00:00 -0500</pubDate>
      
      <guid>http://llbbl.micro.blog/2026/04/26/pgvector-vs-sqlitevec-you-probably.html</guid>
      <description>&lt;p&gt;Whenever I start looking into vector search, I always end up finding information on pgvector. It&amp;rsquo;s totally worth considering, especially if you already have Postgres. But there are situations where it might be overkill. And in those situations, &lt;code&gt;sqlite-vec&lt;/code&gt; (the successor to &lt;code&gt;sqlite-vss&lt;/code&gt;) is quietly becoming the better answer.&lt;/p&gt;
&lt;h2 id=&#34;when-sqlite-wins&#34;&gt;When SQLite Wins&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Local-first apps and CLI tools.&lt;/strong&gt; If your thing runs entirely on a user&amp;rsquo;s machine, a personal knowledge base plugin, a developer CLI, a desktop app, running a full Postgres instance is a huge ask. &lt;code&gt;sqlite-vec&lt;/code&gt; gives you a vector store as a single &lt;code&gt;.db&lt;/code&gt; file sitting next to your markdown or code. Zero configuration. No background daemon. No port management. It&amp;rsquo;s just &lt;em&gt;there&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edge computing.&lt;/strong&gt; 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.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Testing.&lt;/strong&gt; Spinning up a Postgres container just to verify your vector search logic adds seconds to every test run. With &lt;code&gt;sqlite-vec&lt;/code&gt;, 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.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Single-user scenarios.&lt;/strong&gt; 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.&lt;/p&gt;
&lt;h2 id=&#34;the-actual-trade-offs&#34;&gt;The Actual Trade-offs&lt;/h2&gt;
&lt;p&gt;There are real differences and here is what I found.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&#34;text-align:left&#34;&gt;Feature&lt;/th&gt;
&lt;th style=&#34;text-align:left&#34;&gt;&lt;code&gt;sqlite-vec&lt;/code&gt;&lt;/th&gt;
&lt;th style=&#34;text-align:left&#34;&gt;&lt;code&gt;pgvector&lt;/code&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;&lt;strong&gt;Deployment&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;Library (embedded)&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;Server (process/container)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;&lt;strong&gt;Configuration&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;Zero&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;&lt;strong&gt;Portability&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;Single file&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;Database dump/restore&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;&lt;strong&gt;Concurrency&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;One writer&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;Multi-user&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;&lt;strong&gt;Ecosystem&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;Focused vector ops&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;Full relational SQL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;code&gt;pgvector&lt;/code&gt; has better memory management, using the Postgres buffer cache and background workers. &lt;code&gt;sqlite-vec&lt;/code&gt; runs in-process, so a large vector index competes directly with your application&amp;rsquo;s memory. And Postgres has decades of refinement on indexing strategies, JSONB joins, and all the relational features you&amp;rsquo;d expect.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re not using those features, you&amp;rsquo;re paying for complexity you don&amp;rsquo;t need. If you prefer lightweight tools over heavy infrastructure, &lt;code&gt;sqlite-vec&lt;/code&gt; just gets out of the way. There&amp;rsquo;s no &lt;code&gt;docker compose&lt;/code&gt; file required to start your day. The database is just there when your binary runs.&lt;/p&gt;
&lt;h2 id=&#34;pick-the-right-one&#34;&gt;Pick the Right One&lt;/h2&gt;
&lt;p&gt;The decision is probably easier than you would think.&lt;/p&gt;
&lt;p&gt;If you have multiple users writing concurrently, need complex relational queries alongside your vectors, or are already running Postgres, use &lt;code&gt;pgvector&lt;/code&gt;. It&amp;rsquo;s battle-tested and the ecosystem is deep.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re building something local-first, single-user, edge-deployed, or just want fast tests without container overhead, reach for &lt;code&gt;sqlite-vec&lt;/code&gt;. You&amp;rsquo;ll spend less time on infrastructure and more time on the actual problem.&lt;/p&gt;
&lt;p&gt;Not every vector search needs a database server.&lt;/p&gt;
&lt;p&gt;I&amp;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 &lt;a href=&#34;https://micro.blog/llbbl?remote_follow=1&#34;&gt;@logan@llbbl.blog&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>