Optional Syntax Elements for TD_VectorDistance - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-07-09
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantageā„¢
ON clause
Accepts the ReferenceTable clause.
RefIDColumn
Reference table column name that contains identifiers of the reference table vectors.
RefFeatureColumns
List of reference table column names that contain features of the reference table vectors.
You can specify up to 2018 feature columns.
DistanceMeasure
Specify the distance type to compute between the target and the reference vector:
  • Euclidean: Euclidean distance between the target vector and the reference vector.
  • Manhattan: Manhattan distance between the target vector and the reference vector.
  • Cosine: Cosine distance between the target vector and the reference vector.
TopK
Maximum number of closest reference vectors to include in the output table for each target vector. The value k is an integer between 1 and 1024.

Default value: 10

Important: The function returns N2 output if you use the TopK value as -1 because the function includes all reference vectors in the output table.