From 356c4f7a6d48e82f89be55cf56387464e00387c6 Mon Sep 17 00:00:00 2001 From: Takashi Suzuki Date: Tue, 21 Jan 2014 11:43:05 +0900 Subject: [PATCH] =?utf8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=84?= =?utf8?q?=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E4=BF=AE?= =?utf8?q?=E6=AD=A3=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- make_join_rel.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/make_join_rel.c b/make_join_rel.c index 49b255a..68606fe 100644 --- a/make_join_rel.c +++ b/make_join_rel.c @@ -44,7 +44,7 @@ adjust_rows(double rows, RowsHint *hint) hint->base.state = HINT_STATE_USED; if (result < 1.0) ereport(WARNING, - (errmsg("make rows estimation 1 since below 1 : %s", + (errmsg("Force estimate to be at least one row, to avoid possible divide-by-zero when interpolating costs : %s", hint->base.hint_str))); result = clamp_row_est(result); elog(DEBUG1, "adjusted rows %d to %d", (int) rows, (int) result); @@ -122,12 +122,13 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2) rows_hint = current_hint->rows_hints[i]; /* - * This Rows hint specifies aliasname is error, or does not exist in - * query. + * This Rows hint is invalid for some reason, or it contains no + * aliasname which exists in the query. */ if (!rows_hint->joinrelids || rows_hint->base.state == HINT_STATE_ERROR) continue; + if (bms_equal(joinrelids, rows_hint->joinrelids)) { /* -- 2.11.0