Improved test SQL [skip ci]

This commit is contained in:
Andrew Kane
2024-04-10 16:38:07 -07:00
parent 8178a902ce
commit d64295dfd7
3 changed files with 3 additions and 3 deletions

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)
));