From b158a5fa48b1492e83a839cceb303ae81785ab33 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sat, 10 Jun 2023 01:07:54 -0700 Subject: [PATCH] Moved get_tablespace_page_costs [skip ci] --- src/ivfflat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ivfflat.c b/src/ivfflat.c index 45064c3..0a7eb8d 100644 --- a/src/ivfflat.c +++ b/src/ivfflat.c @@ -113,11 +113,11 @@ ivfflatcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, genericcostestimate(root, path, loop_count, qinfos, &costs); #endif + get_tablespace_page_costs(path->indexinfo->reltablespace, NULL, &spc_seq_page_cost); + /* Use total cost since most work happens before first tuple is returned */ startupCost = costs.indexTotalCost; - get_tablespace_page_costs(path->indexinfo->reltablespace, NULL, &spc_seq_page_cost); - if (costs.spc_random_page_cost > spc_seq_page_cost) { /* Adjust cost if needed since TOAST not included in seq scan cost */