Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf4dcaab

Browse files
committed
Bugfix. The predicted_cardinality field of a plan node could be
established by previous execution of this plan in another query.
1 parentd0afdc1 commitf4dcaab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎postprocessing.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,13 @@ learnOnPlanState(PlanState *p, void *context)
304304
* to calculate produced rows. */
305305
learn_rows=p->instrument->ntuples /p->instrument->nloops;
306306

307-
if (p->plan->predicted_cardinality>0.)
307+
/*
308+
* Calculate predicted cardinality.
309+
* We could find a positive value of predicted cardinality in
310+
* the case of reusing plan caused by the rewriting procedure.
311+
* Also it may be caused by using of a generic plan.
312+
*/
313+
if (p->plan->predicted_cardinality>0.&&query_context.use_aqo)
308314
predicted=p->plan->predicted_cardinality;
309315
elseif (IsParallelTuplesProcessing(p->plan))
310316
predicted=p->plan->plan_rows*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp