mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-12 07:36:55 +08:00
Fixed test logic [skip ci]
This commit is contained in:
@@ -47,13 +47,13 @@ like($explain, qr/Index Scan using idx/);
|
|||||||
|
|
||||||
# Test attribute filtering with few rows removed comparison
|
# Test attribute filtering with few rows removed comparison
|
||||||
$explain = $node->safe_psql("postgres", qq(
|
$explain = $node->safe_psql("postgres", qq(
|
||||||
EXPLAIN ANALYZE SELECT i FROM tst WHERE c < 1 ORDER BY v <-> '$query' LIMIT $limit;
|
EXPLAIN ANALYZE SELECT i FROM tst WHERE c >= 1 ORDER BY v <-> '$query' LIMIT $limit;
|
||||||
));
|
));
|
||||||
like($explain, qr/Index Scan using idx/);
|
like($explain, qr/Index Scan using idx/);
|
||||||
|
|
||||||
# Test attribute filtering with many rows removed comparison
|
# Test attribute filtering with many rows removed comparison
|
||||||
$explain = $node->safe_psql("postgres", qq(
|
$explain = $node->safe_psql("postgres", qq(
|
||||||
EXPLAIN ANALYZE SELECT i FROM tst WHERE c >= 1 ORDER BY v <-> '$query' LIMIT $limit;
|
EXPLAIN ANALYZE SELECT i FROM tst WHERE c < 1 ORDER BY v <-> '$query' LIMIT $limit;
|
||||||
));
|
));
|
||||||
# TODO Do not use index
|
# TODO Do not use index
|
||||||
like($explain, qr/Index Scan using idx/);
|
like($explain, qr/Index Scan using idx/);
|
||||||
|
|||||||
@@ -47,13 +47,13 @@ like($explain, qr/Index Scan using idx/);
|
|||||||
|
|
||||||
# Test attribute filtering with few rows removed comparison
|
# Test attribute filtering with few rows removed comparison
|
||||||
$explain = $node->safe_psql("postgres", qq(
|
$explain = $node->safe_psql("postgres", qq(
|
||||||
EXPLAIN ANALYZE SELECT i FROM tst WHERE c < 1 ORDER BY v <-> '$query' LIMIT $limit;
|
EXPLAIN ANALYZE SELECT i FROM tst WHERE c >= 1 ORDER BY v <-> '$query' LIMIT $limit;
|
||||||
));
|
));
|
||||||
like($explain, qr/Index Scan using idx/);
|
like($explain, qr/Index Scan using idx/);
|
||||||
|
|
||||||
# Test attribute filtering with many rows removed comparison
|
# Test attribute filtering with many rows removed comparison
|
||||||
$explain = $node->safe_psql("postgres", qq(
|
$explain = $node->safe_psql("postgres", qq(
|
||||||
EXPLAIN ANALYZE SELECT i FROM tst WHERE c >= 1 ORDER BY v <-> '$query' LIMIT $limit;
|
EXPLAIN ANALYZE SELECT i FROM tst WHERE c < 1 ORDER BY v <-> '$query' LIMIT $limit;
|
||||||
));
|
));
|
||||||
# TODO Do not use index
|
# TODO Do not use index
|
||||||
like($explain, qr/Index Scan using idx/);
|
like($explain, qr/Index Scan using idx/);
|
||||||
|
|||||||
Reference in New Issue
Block a user