From 0d3c5cdc8f49e4bd1dd6f3f6b3d80113c6410e62 Mon Sep 17 00:00:00 2001 From: TotaJ Date: Fri, 12 Mar 2021 14:18:48 +0800 Subject: [PATCH] Fix cost_index. --- src/gausskernel/optimizer/path/costsize.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gausskernel/optimizer/path/costsize.cpp b/src/gausskernel/optimizer/path/costsize.cpp index fa6a6bc62..406c8d1ba 100644 --- a/src/gausskernel/optimizer/path/costsize.cpp +++ b/src/gausskernel/optimizer/path/costsize.cpp @@ -1252,6 +1252,7 @@ void cost_index(IndexPath* path, PlannerInfo* root, double loop_count) pages_fetched, min_IO_cost))); } + min_IO_cost = Min(min_IO_cost, max_IO_cost); /* * Now interpolate based on estimated index order correlation to get total * disk I/O cost for main table accesses.