Improved performance of IVFFlat index scans - resolves #1058

Co-authored-by: Waterpine <songb@nvidia.com>
This commit is contained in:
Andrew KaneandWaterpine committed 2026-11-17 21:45:02 -08:00
1 parent e6b1ba6bfa
commit a2328b7bd3
5 files changed
+240 -9

No files matched your search

+10
View File
@@ -133,3 +133,13 @@ SELECT pg_index_column_has_property('idx'::regclass, 2, 'distance_orderable');
SELECT pg_index_column_has_property('idx'::regclass, 1, 'search_nulls');
DROP TABLE t;
-- work memory
SET work_mem = '64kB';
CREATE TABLE t (val vector(3));
INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]');
CREATE INDEX ON t USING ivfflat (val vector_l2_ops) WITH (lists = 1);
SELECT * FROM t ORDER BY val <-> '[3,3,3]';
DROP TABLE t;
RESET work_mem;