What is Vector Database

Estimated read time 3 min read

A vector database is a specialized type of database designed to store, index, and search high-dimensional vector embeddings. These vectors typically represent data like text, images, audio, or video after they’ve been processed by machine learning models (e.g., embeddings from BERT, CLIP, etc.). Vector databases are optimized for similarity search using metrics such as cosine similarity, Euclidean distance, or dot product.

Key Features of Vector Databases:

  • Efficient vector indexing (e.g., HNSW, IVF, PQ)
  • Similarity search / nearest neighbor search
  • Support for high-dimensional data
  • Integration with ML/AI pipelines
  • Some support hybrid search (vector + keyword filtering)

Popular Open-Source Vector Databases

NameLanguageDescription
FAISS (Meta)C++/PythonVery fast, widely used library for similarity search.
Annoy (Spotify)C++/PythonOptimized for read-only memory-mapped datasets.
HNSWlibC++/PythonImplements Hierarchical Navigable Small World graph algorithm.
MilvusC++/GoFull-featured vector DB with clustering, sharding, and hybrid search.
WeaviateGoVector DB with REST/GraphQL API, supports hybrid search.
QdrantRustHigh-performance DB with filtering, gRPC/REST APIs.
Vald (by Yahoo Japan)GoCloud-native, k8s-integrated vector search.
Vespa (Yahoo)JavaSearch engine that supports vector and traditional search.

Commercial / Managed Vector Database Solutions

NameBased onNotes
PineconeProprietaryManaged service, scalable, good for production ML workloads.
Zilliz CloudMilvusManaged version of Milvus.
Weaviate CloudWeaviateHosted version of Weaviate.
Qdrant CloudQdrantHosted Qdrant with scaling and monitoring.
Amazon OpenSearch + k-NNFAISS/HNSWAmazon service with vector search plugin.
Azure Cognitive SearchProprietaryIntegrated AI and vector capabilities.
Google Vertex AI SearchProprietaryIncludes vector search within AI stack.
Redis (with Redis-Vector)CIn-memory DB with vector search plugin.
Elasticsearch (with KNN plugin)JavaTraditional search engine extended for vectors.

There are over a dozen well-maintained open-source vector databases, and many commercial offerings. Open-source choices like Milvus, Weaviate, Qdrant, and FAISS are common in research and self-managed deployments. For ease of use and scalability, companies often turn to Pinecone, Zilliz Cloud, or Qdrant Cloud.

Does MySQL or PostgreSQL support vector?

Yes, both MySQL and PostgreSQL support vectors to some extent, especially with recent updates and extensions — though their vector support is not as advanced or optimized as dedicated vector databases.

PostgreSQL (Yes, with extensions)

PostgreSQL has good support for vector search thanks to:

  1. pgvector extension (very popular):
    • Adds a new data type: vector
    • Supports similarity search using cosine, L2 (Euclidean), or inner product.
    • Indexing via IVFFlat for approximate nearest neighbors.
    • Open-source and actively maintained.
    • Widely used with LLM apps (e.g., LangChain + Postgres + pgvector).
    Example: CREATE TABLE items (id serial, embedding vector(768)); SELECT * FROM items ORDER BY embedding <-> '[0.1, 0.2, 0.3]' LIMIT 5;
  2. Can be self-hosted or used via services like:
    • Supabase (PostgreSQL + pgvector)
    • Neon (cloud-native PostgreSQL with vector support)

MySQL (Limited vector support)

  • MySQL does not natively support a vector data type as of May 2025.
  • Some users store vectors as JSON or blobs and implement manual similarity search in the application layer — but this is inefficient and not scalable.
  • There’s no built-in index support for vector similarity search in standard MySQL.
  • Some vendors or forks (e.g., MariaDB) may introduce limited support in the future, but MySQL is currently not ideal for vector search.

Verdict:

FeaturePostgreSQL + pgvectorMySQL
Native vector typevector(n)❌ No
Approximate search✅ (IVFFlat)❌ No
Indexing support
Community/LLM usage✅ Popular❌ Rare
Production-ready⚠️ Workarounds only

Use PostgreSQL with pgvector if you want to stay in a relational database but need vector capabilities. For serious scale or performance, consider dedicated vector DBs like Milvus, Pinecone, or Qdrant.

Related Articles