Proposed MySQL vector distance functions let you compare embeddings and run similarity search in SQL, without exporting the data to another system.
DISTANCE() and its synonym VECTOR_DISTANCE() take two vectors and a metric: Euclidean, squared Euclidean, cosine, dot product, or Manhattan. The functions check that the vectors match in dimension and length and reject invalid numbers. The implementation keeps results consistent across CPU architectures and calculates distances with scalar, AVX2, and AVX-512 kernels.
Isolated benchmarks show about a fivefold to tenfold speedup. End-to-end SQL gains depend on the vector size and on how much of the query time is the distance calculation. This is a pull request for MySQL, not a feature in MySQL Community Edition yet. Windows support and a vector index are still open.
Event
Speaker card



