mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-01 18:21:16 +08:00
Added HNSW index type
This commit is contained in:
14
test/sql/hnsw_options.sql
Normal file
14
test/sql/hnsw_options.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
SET enable_seqscan = off;
|
||||
|
||||
CREATE TABLE t (val vector(3));
|
||||
CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (m = 3);
|
||||
CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (m = 101);
|
||||
CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (ef_construction = 9);
|
||||
CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (ef_construction = 1001);
|
||||
|
||||
SHOW hnsw.ef_search;
|
||||
|
||||
SET hnsw.ef_search = 9;
|
||||
SET hnsw.ef_search = 1001;
|
||||
|
||||
DROP TABLE t;
|
||||
Reference in New Issue
Block a user