Skip to main content

Menu

Webinar

Built for the Agentic Era: Introducing MariaDB Enterprise Platform 2027

Register now

Is MariaDB Used in Production? Real-World Setups, Proof & AI

By Alejandro Duarte

5 min read
Share
CREATE TABLE product_embeddings (
id INT PRIMARY KEY,
embedding VECTOR(768)
);


-- Find the most similar embeddings to a given vector
SELECT id
FROM product_embeddings
ORDER BY VEC_DISTANCE_COSINE(
embedding,
VEC_FromText('[0.12,0.34,0.56, ... ]') -- search vector here
) ASC
LIMIT 5;