Vector search overview

Store embeddings in PLOMID and run similarity search with SQL — what works, what is limited, and where to start.

Version
Latest
v0.1.0 · latest 2 min read
On this page
  1. The workflow
  2. Status at a glance
  3. Where to go

PLOMID stores dense embedding vectors as a native column type and searches them with SQL distance operators. You insert vectors as literals, rank rows with ORDER BY ... LIMIT k, and optionally accelerate large scans with an HNSW index. Supported in v0.1.0 for dense vectors; sparse, binary, and multivector types parse but have narrower execution paths (see Limitations).

diagram
flowchart LR
    APP["application data"] --> EMB["embedding model\n(outside PLOMID)"] --> VEC["vector column\nVECTOR(FLOAT32, n)"]
    VEC --> Q["similarity query\nORDER BY embedding <-> query LIMIT k"]
    Q --> EX["exact scan\n(always correct)"]
    Q --> ANN["HNSW index\n(faster at scale)"]
    EX --> R["top-k rows + distances"]
    ANN --> R
    R --> USE["application uses\nretrieved records"]
Diagram source · mermaidcopy included
mermaidsource
flowchart LR
    APP["application data"] --> EMB["embedding model\n(outside PLOMID)"] --> VEC["vector column\nVECTOR(FLOAT32, n)"]
    VEC --> Q["similarity query\nORDER BY embedding <-> query LIMIT k"]
    Q --> EX["exact scan\n(always correct)"]
    Q --> ANN["HNSW index\n(faster at scale)"]
    EX --> R["top-k rows + distances"]
    ANN --> R
    R --> USE["application uses\nretrieved records"]

The workflow#

  1. Your application converts data (text, images) into embeddings with an external model. PLOMID does not generate embeddings.
  2. You store each embedding in a VECTOR column alongside ordinary fields (id, label, metadata).
  3. You query with a distance operator (<->, <=>, <#>, <~>, <%>) and ORDER BY ... LIMIT k.
  4. Without an index, every query is an exact scan — always correct, slower as data grows.
  5. With an HNSW index, large datasets trade a small amount of recall for much faster candidate retrieval.

Status at a glance#

Capability Status Details
Dense VECTOR columns (FLOAT32/16, BFLOAT16, INT8/UINT8/INT4) Supported Vector types
Distance operators <-> <=> <#> <~> <%> Supported Distance operators
Exact top-k similarity search Supported Similarity search
HNSW approximate search Supported HNSW
Other index methods (ivf_flat, ivf_sq, ivf_pq, diskann, flat) Supported (declared; small scans may still run exact) Indexes
Metadata filtering (WHERE + vector ordering) Supported (served by exact path) Filtering
Binary vectors (VECTOR(BINARY, n)) Limited (DDL + string literals + Hamming/Jaccard; ANN falls back to exact) Limitations
Sparse / multivector types Experimental (DDL parses; no verified literal/insert path) Limitations
GPU acceleration Unsupported (CPU only; GPU setting degrades to CPU) Performance
CREATE INDEX ... USING hnsw inside an explicit transaction Unsupported (use autocommit) Troubleshooting

Where to go#

Was this page helpful?