Improved test SQL [skip ci]

This commit is contained in:
Andrew Kane committed 2024-04-10 16:38:07 -07:00
1 parent 8178a902ce
commit d64295dfd7
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -85,7 +85,7 @@ for my $i (0 .. $#operators)
# Handle ties
my $res = $node->safe_psql("postgres", qq(
WITH top AS (
SELECT v $operator $_ AS distance FROM tst ORDER BY v $operator $_ LIMIT $limit
SELECT v $operator $_ AS distance FROM tst ORDER BY distance LIMIT $limit
)
SELECT i FROM tst WHERE (v $operator $_) <= (SELECT MAX(distance) FROM top)
));
+1 -1
View File
@@ -98,7 +98,7 @@ for my $i (0 .. $#operators)
my $res = $node->safe_psql("postgres", qq(
SET enable_indexscan = off;
WITH top AS (
SELECT v $operator $_ AS distance FROM tst ORDER BY v $operator $_ LIMIT $limit
SELECT v $operator $_ AS distance FROM tst ORDER BY distance LIMIT $limit
)
SELECT i FROM tst WHERE (v $operator $_) <= (SELECT MAX(distance) FROM top)
));
+1 -1
View File
@@ -83,7 +83,7 @@ foreach (@queries)
my $res = $node->safe_psql("postgres", qq(
SET enable_indexscan = off;
WITH top AS (
SELECT v <~> $_ AS distance FROM tst ORDER BY v <~> $_ LIMIT $limit
SELECT v <~> $_ AS distance FROM tst ORDER BY distance LIMIT $limit
)
SELECT i FROM tst WHERE (v <~> $_) <= (SELECT MAX(distance) FROM top)
));