mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-11 23:26:55 +08:00
Added test for filtering with few rows removed
This commit is contained in:
@@ -39,6 +39,12 @@ my $explain = $node->safe_psql("postgres", qq(
|
|||||||
# TODO Do not use index
|
# TODO Do not use index
|
||||||
like($explain, qr/Index Scan using idx/);
|
like($explain, qr/Index Scan using idx/);
|
||||||
|
|
||||||
|
# Test attribute filtering with few rows removed
|
||||||
|
my $explain = $node->safe_psql("postgres", qq(
|
||||||
|
EXPLAIN ANALYZE SELECT i FROM tst WHERE c != $c ORDER BY v <-> '$query' LIMIT $limit;
|
||||||
|
));
|
||||||
|
like($explain, qr/Index Scan using idx/);
|
||||||
|
|
||||||
# Test distance filtering
|
# Test distance filtering
|
||||||
$explain = $node->safe_psql("postgres", qq(
|
$explain = $node->safe_psql("postgres", qq(
|
||||||
EXPLAIN ANALYZE SELECT i FROM tst WHERE v <-> '$query' < 1 ORDER BY v <-> '$query' LIMIT $limit;
|
EXPLAIN ANALYZE SELECT i FROM tst WHERE v <-> '$query' < 1 ORDER BY v <-> '$query' LIMIT $limit;
|
||||||
|
|||||||
Reference in New Issue
Block a user