From 351db562af0fe4f401892adab69da5ef7eda4ba1 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sat, 28 Sep 2024 16:07:31 -0700 Subject: [PATCH] Improved code [skip ci] --- src/hnsw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hnsw.c b/src/hnsw.c index 2103dca..5f6df13 100644 --- a/src/hnsw.c +++ b/src/hnsw.c @@ -118,8 +118,8 @@ hnswcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, double layer0Selectivity; double scalingFactor = 0.55; double ratio; - double spc_seq_page_cost; double startupPages; + double spc_seq_page_cost; Relation index; /* Never use index without order */ @@ -201,7 +201,7 @@ hnswcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, *indexPages = costs.numIndexPages; Assert(*indexStartupCost > 0); - Assert(*indexTotalCost > *indexStartupCost); + Assert(*indexTotalCost >= *indexStartupCost); } /*