pgvector.git / summary / log / commit / refs
commit dc8d467ba59295ddf8e6ce83907aee1281dfcb48
Author: Andrew Kane <andrew@ankane.org>
Date: Sun Aug 13 20:46:06 2023 +0000
Improved HNSW vacuum recall test
test/t/016_hnsw_vacuum_recall.pl | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/test/t/016_hnsw_vacuum_recall.pl b/test/t/016_hnsw_vacuum_recall.pl
index eb0d4f7f..35548aa5 100644
--- a/test/t/016_hnsw_vacuum_recall.pl
+++ b/test/t/016_hnsw_vacuum_recall.pl
@@ -61,10 +61,10 @@ $node->safe_psql("postgres",
);
# Add index
-$node->safe_psql("postgres", "CREATE INDEX ON tst USING hnsw (v vector_l2_ops);");
+$node->safe_psql("postgres", "CREATE INDEX ON tst USING hnsw (v vector_l2_ops) WITH (m = 4);");
# Delete data
-$node->safe_psql("postgres", "DELETE FROM tst WHERE i > 5000;");
+$node->safe_psql("postgres", "DELETE FROM tst WHERE i > 2500;");
# Generate queries
for (1 .. 20)
@@ -86,11 +86,12 @@ foreach (@queries)
push(@expected, $res);
}
-test_recall(0.40, $limit, "before vacuum");
-test_recall(0.99, 60, "before vacuum");
+test_recall(0.20, $limit, "before vacuum");
+test_recall(0.95, 100, "before vacuum");
+# TODO test concurrent inserts with vacuum
$node->safe_psql("postgres", "VACUUM tst;");
-test_recall(0.99, $limit, "after vacuum");
+test_recall(0.95, $limit, "after vacuum");
done_testing();
[parent: 29a0a007319f]