mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-13 16:16:56 +08:00
Added IVFFlat memory tests for bit [skip ci]
This commit is contained in:
@@ -35,3 +35,25 @@ NOTICE: ivfflat index created with little data
|
|||||||
DETAIL: This will cause low recall.
|
DETAIL: This will cause low recall.
|
||||||
HINT: Drop the index until the table has more data.
|
HINT: Drop the index until the table has more data.
|
||||||
DROP TABLE t;
|
DROP TABLE t;
|
||||||
|
-- memory
|
||||||
|
CREATE TABLE t (val bit(64000));
|
||||||
|
CREATE INDEX ON t USING ivfflat (val bit_hamming_ops) WITH (lists = 32768);
|
||||||
|
ERROR: memory required is 251 MB, maintenance_work_mem is 64 MB
|
||||||
|
DROP TABLE t;
|
||||||
|
SET maintenance_work_mem = '1MB';
|
||||||
|
CREATE TABLE t (val bit(64000));
|
||||||
|
CREATE INDEX ON t USING ivfflat (val bit_hamming_ops);
|
||||||
|
NOTICE: ivfflat index created with little data
|
||||||
|
DETAIL: This will cause low recall.
|
||||||
|
HINT: Drop the index until the table has more data.
|
||||||
|
DROP TABLE t;
|
||||||
|
RESET maintenance_work_mem;
|
||||||
|
SET maintenance_work_mem = '29MB';
|
||||||
|
CREATE TABLE t (val bit(64000));
|
||||||
|
INSERT INTO t (val) VALUES (B'0'::bit(64000));
|
||||||
|
CREATE INDEX ON t USING ivfflat (val bit_hamming_ops);
|
||||||
|
NOTICE: ivfflat index created with little data
|
||||||
|
DETAIL: This will cause low recall.
|
||||||
|
HINT: Drop the index until the table has more data.
|
||||||
|
DROP TABLE t;
|
||||||
|
RESET maintenance_work_mem;
|
||||||
|
|||||||
@@ -21,3 +21,22 @@ CREATE INDEX ON t USING ivfflat ((val::bit(3)) bit_hamming_ops) WITH (lists = 1)
|
|||||||
CREATE INDEX ON t USING ivfflat ((val::bit(64001)) bit_hamming_ops) WITH (lists = 1);
|
CREATE INDEX ON t USING ivfflat ((val::bit(64001)) bit_hamming_ops) WITH (lists = 1);
|
||||||
CREATE INDEX ON t USING ivfflat ((val::bit(2)) bit_hamming_ops) WITH (lists = 5);
|
CREATE INDEX ON t USING ivfflat ((val::bit(2)) bit_hamming_ops) WITH (lists = 5);
|
||||||
DROP TABLE t;
|
DROP TABLE t;
|
||||||
|
|
||||||
|
-- memory
|
||||||
|
|
||||||
|
CREATE TABLE t (val bit(64000));
|
||||||
|
CREATE INDEX ON t USING ivfflat (val bit_hamming_ops) WITH (lists = 32768);
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
SET maintenance_work_mem = '1MB';
|
||||||
|
CREATE TABLE t (val bit(64000));
|
||||||
|
CREATE INDEX ON t USING ivfflat (val bit_hamming_ops);
|
||||||
|
DROP TABLE t;
|
||||||
|
RESET maintenance_work_mem;
|
||||||
|
|
||||||
|
SET maintenance_work_mem = '29MB';
|
||||||
|
CREATE TABLE t (val bit(64000));
|
||||||
|
INSERT INTO t (val) VALUES (B'0'::bit(64000));
|
||||||
|
CREATE INDEX ON t USING ivfflat (val bit_hamming_ops);
|
||||||
|
DROP TABLE t;
|
||||||
|
RESET maintenance_work_mem;
|
||||||
|
|||||||
Reference in New Issue
Block a user