Each vector takes 4 * dimensions + 8 bytes of storage. Each element is a single-precision floating-point number (like the real type in Postgres), and all elements must be finite (no NaN, Infinity or -Infinity). Vectors can have up to 16,000 dimensions.
Each half vector takes 2 * dimensions + 8 bytes of storage. Each element is a half-precision floating-point number, and all elements must be finite (no NaN, Infinity or -Infinity). Half vectors can have up to 16,000 dimensions.
Each bit vector takes dimensions / 8 + 8 bytes of storage. See the Postgres docs for more info.
Bit Operators
Operator
Description
Added
<~>
Hamming distance
0.7.0
<%>
Jaccard distance
0.7.0
Bit Functions
Function
Description
Added
hamming_distance(bit, bit) → double precision
Hamming distance
0.7.0
jaccard_distance(bit, bit) → double precision
Jaccard distance
0.7.0
Sparsevec Type
Each sparse vector takes 8 * non-zero elements + 16 bytes of storage. Each element is a single-precision floating-point number, and all elements must be finite (no NaN, Infinity or -Infinity). Sparse vectors can have up to 16,000 non-zero elements.