Updated cost estimation to not use index when expected tuples is too low

This commit is contained in:
Andrew Kane
2024-01-21 12:39:57 -08:00
parent 91acc3c178
commit f133e841b5
25 changed files with 223 additions and 50 deletions

View File

@@ -49,7 +49,7 @@ is(idx_scan(), 0);
$count = $node->safe_psql("postgres", qq(
SET enable_seqscan = off;
SET ivfflat.probes = 100;
SELECT COUNT(*) FROM (SELECT v FROM tst ORDER BY v <-> (SELECT v FROM tst LIMIT 1)) t;
SELECT COUNT(*) FROM (SELECT v FROM tst ORDER BY v <-> (SELECT v FROM tst LIMIT 1) LIMIT 20000) t;
));
is($count, $expected);
is(idx_scan(), 1);