Back to feed
Dev.to
Dev.to
7/21/2026
Can ClickHouse Replace a Vector Database?

Can ClickHouse Replace a Vector Database?

Short summary

A hands-on evaluation of whether ClickHouse can replace dedicated vector databases like Pinecone or Weaviate for embedding storage and similarity search. The author benchmarks brute-force L2Distance queries, showing near-linear scaling with row count and dimension, and notes SQL filtering provides modest gains without proper table design. ClickHouse's HNSW-based vector similarity index is discussed but couldn't be benchmarked in the test environment.

  • Brute-force vector search in ClickHouse scales near-linearly with rows and dimensions — 1M rows at 128-dim takes ~0.4s
  • SQL filtering yields only ~8% improvement unless table ordering is designed around filter columns
  • HNSW vector similarity index exists in ClickHouse but wasn't benchmarked; dedicated vector DBs may still win at scale

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more