PlanetScale
PlanetScale logoPlanetScale · Feature trail

Vector Indexing for Relational Databases

5 posts · Oct 2023 – Oct 2025

What this trail covers

PlanetScale offers GA support for vector search and storage within MySQL, making vectors a first-class part of the RDBMS. This includes relational indexing for vectors, allowing them to be stored in columns, indexed with `ALTER` or `CREATE VECTOR INDEX` statements, and queried with standard SQL `JOIN` and `WHERE` clauses within transactions. All PlanetScale features, such as branching, deploy requests, and backups, are supported. The system offers multiple distance metrics (Euclidean, inner product, cosine), supports up to 16,383 dimensions, and includes fixed and product quantization. A key innovation is the integration of SPANN (Space-Partitioned Approximate Nearest Neighbors), enabling indexes larger than RAM by combining partition-based and tree-based approaches. This allows efficient operation with vector data up to 6x bigger than available memory, with performance benefits amplified on PlanetScale Metal.

All PlanetScale trails