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

Commit89caf56

Browse files
committed
Fix planning bug introduced in recent code reorganization for hashed
aggregates: tuple_fraction has to be adjusted before passing it tocompare_fractional_path_costs().
1 parent65fbc29 commit89caf56

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/optimizer/plan/planner.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.127 2002/11/06 22:31:24 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.128 2002/11/14 19:00:36 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1257,6 +1257,9 @@ grouping_planner(Query *parse, double tuple_fraction)
12571257
sorted_path->parent->rows,sorted_path->parent->width);
12581258
sort_path.startup_cost+=cheapest_path->total_cost;
12591259
sort_path.total_cost+=cheapest_path->total_cost;
1260+
/* Convert absolute-count tuple_fraction into a fraction */
1261+
if (tuple_fraction >=1.0)
1262+
tuple_fraction /=sorted_path->parent->rows;
12601263
if (compare_fractional_path_costs(sorted_path,&sort_path,
12611264
tuple_fraction) <=0)
12621265
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp