Changeset: 77a8b52d3099 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/77a8b52d3099
Modified Files:
sql/server/rel_statistics.c
Branch: Sep2022
Log Message:
Don't set output count to 0 if unique_est larger than non-deleted count.
The estimate is based on all values, not just the non-deleted ones, so
may well be larger. And anyway, it's an estimate.
diffs (13 lines):
diff --git a/sql/server/rel_statistics.c b/sql/server/rel_statistics.c
--- a/sql/server/rel_statistics.c
+++ b/sql/server/rel_statistics.c
@@ -883,7 +883,8 @@ rel_get_statistics_(visitor *v, sql_rel
}
}
}
- set_count_prop(v->sql->sa, rel, cnt/u);
+ /* u is an *estimate*, so don't set
count_prop to 0 unless cnt is 0 */
+ set_count_prop(v->sql->sa, rel, cnt ==
0 ? 0 : u > cnt ? 1 : cnt/u);
} else {
set_count_prop(v->sql->sa, rel,
get_rel_count(l));
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]