Skip to main content
Enterprise only
duplicate_pairs scans a vector column’s index partitions for every pair of rows closer than a distance threshold, without a full pairwise scan or a shuffle. It returns one row per close pair, not one row per source row — use it to inspect what would be collapsed before committing to dedupe, which resolves these same pairs into groups.
Earlier releases spelled this vector_duplicate_pairs; that name is rejected on current deployments.

Input

resolution is refused on duplicate_pairs: a pair has no notion of a group, only dedupe accepts it.

Output

See dedupe index prerequisites and the recall limits. Pairs are found within each physical partition and index segment, not across them. A full scan requires complete index coverage; sampling is a diagnostic view of the selected indexed partitions and does not prove coverage or recall for the rest of the table. One row per close pair found, in a fixed schema independent of the source table:

Application-level identifiers

A row ID is internal and not stable across compaction. Pass id_column, a top-level scalar column such as a primary key, to also project its value: id_a/id_b, typed like id_column, are appended alongside row_id_a/row_id_b, which remain in the output.

Sampling partitions

selection scopes the scan to a sample of partitions instead of all of them, the same all (default) / first / random choice as ivf_partition. Use it to estimate a distance threshold or duplicate rate on a large table before scanning it in full:

What to read next

DEDUPE

Resolve these same pairs into one representative row per group.

Deduplicate near-duplicates

When to reach for this instead of exact-key deduplication.