diff options
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r-- | src/backend/optimizer/path/costsize.c | 12 | ||||
-rw-r--r-- | src/backend/optimizer/path/joinpath.c | 20 | ||||
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 8 |
3 files changed, 20 insertions, 20 deletions
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c index 025f011657a..8251b8d4511 100644 --- a/src/backend/optimizer/path/costsize.c +++ b/src/backend/optimizer/path/costsize.c @@ -42,7 +42,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.63 2000/09/29 18:21:32 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.64 2000/10/05 19:48:26 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -571,7 +571,7 @@ cost_mergejoin(Path *path, * 'outer_path' is the path for the outer relation * 'inner_path' is the path for the inner relation * 'restrictlist' are the RestrictInfo nodes to be applied at the join - * 'innerdisbursion' is an estimate of the disbursion statistic + * 'innerdispersion' is an estimate of the dispersion statistic * for the inner hash key. */ void @@ -579,7 +579,7 @@ cost_hashjoin(Path *path, Path *outer_path, Path *inner_path, List *restrictlist, - Selectivity innerdisbursion) + Selectivity innerdispersion) { Cost startup_cost = 0; Cost run_cost = 0; @@ -609,12 +609,12 @@ cost_hashjoin(Path *path, * average bucket loading of NTUP_PER_BUCKET, but that goal will * be reached only if data values are uniformly distributed among * the buckets. To be conservative, we scale up the target bucket - * size by the number of inner rows times inner disbursion, giving + * size by the number of inner rows times inner dispersion, giving * an estimate of the typical number of duplicates of each value. * We then charge one cpu_operator_cost per tuple comparison. */ run_cost += cpu_operator_cost * outer_path->parent->rows * - NTUP_PER_BUCKET * ceil(inner_path->parent->rows * innerdisbursion); + NTUP_PER_BUCKET * ceil(inner_path->parent->rows * innerdispersion); /* * Estimate the number of tuples that get through the hashing filter @@ -649,7 +649,7 @@ cost_hashjoin(Path *path, /* * Bias against putting larger relation on inside. We don't want an * absolute prohibition, though, since larger relation might have - * better disbursion --- and we can't trust the size estimates + * better dispersion --- and we can't trust the size estimates * unreservedly, anyway. Instead, inflate the startup cost by the * square root of the size ratio. (Why square root? No real good * reason, but it seems reasonable...) diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index d8bfe6270de..0dbfef8b2fc 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.57 2000/09/29 18:21:32 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.58 2000/10/05 19:48:26 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -45,7 +45,7 @@ static void hash_inner_and_outer(Query *root, RelOptInfo *joinrel, List *restrictlist, JoinType jointype); static Path *best_innerjoin(List *join_paths, List *outer_relid, JoinType jointype); -static Selectivity estimate_disbursion(Query *root, Var *var); +static Selectivity estimate_dispersion(Query *root, Var *var); static List *select_mergejoin_clauses(RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel, @@ -637,7 +637,7 @@ hash_inner_and_outer(Query *root, *right, *inner; List *hashclauses; - Selectivity innerdisbursion; + Selectivity innerdispersion; if (restrictinfo->hashjoinoperator == InvalidOid) continue; /* not hashjoinable */ @@ -667,8 +667,8 @@ hash_inner_and_outer(Query *root, /* always a one-element list of hash clauses */ hashclauses = makeList1(restrictinfo); - /* estimate disbursion of inner var for costing purposes */ - innerdisbursion = estimate_disbursion(root, inner); + /* estimate dispersion of inner var for costing purposes */ + innerdispersion = estimate_dispersion(root, inner); /* * We consider both the cheapest-total-cost and @@ -682,7 +682,7 @@ hash_inner_and_outer(Query *root, innerrel->cheapest_total_path, restrictlist, hashclauses, - innerdisbursion)); + innerdispersion)); if (outerrel->cheapest_startup_path != outerrel->cheapest_total_path) add_path(joinrel, (Path *) create_hashjoin_path(joinrel, @@ -691,7 +691,7 @@ hash_inner_and_outer(Query *root, innerrel->cheapest_total_path, restrictlist, hashclauses, - innerdisbursion)); + innerdispersion)); } } @@ -759,7 +759,7 @@ best_innerjoin(List *join_paths, Relids outer_relids, JoinType jointype) } /* - * Estimate disbursion of the specified Var + * Estimate dispersion of the specified Var * * We use a default of 0.1 if we can't figure out anything better. * This will typically discourage use of a hash rather strongly, @@ -768,7 +768,7 @@ best_innerjoin(List *join_paths, Relids outer_relids, JoinType jointype) * seem much worse). */ static Selectivity -estimate_disbursion(Query *root, Var *var) +estimate_dispersion(Query *root, Var *var) { Oid relid; @@ -780,7 +780,7 @@ estimate_disbursion(Query *root, Var *var) if (relid == InvalidOid) return 0.1; - return (Selectivity) get_attdisbursion(relid, var->varattno, 0.1); + return (Selectivity) get_attdispersion(relid, var->varattno, 0.1); } /* diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 737b4db2d3d..36843f834da 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.66 2000/09/29 18:21:23 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.67 2000/10/05 19:48:27 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -522,7 +522,7 @@ create_mergejoin_path(RelOptInfo *joinrel, * 'restrict_clauses' are the RestrictInfo nodes to apply at the join * 'hashclauses' is a list of the hash join clause (always a 1-element list) * (this should be a subset of the restrict_clauses list) - * 'innerdisbursion' is an estimate of the disbursion of the inner hash key + * 'innerdispersion' is an estimate of the dispersion of the inner hash key * */ HashPath * @@ -532,7 +532,7 @@ create_hashjoin_path(RelOptInfo *joinrel, Path *inner_path, List *restrict_clauses, List *hashclauses, - Selectivity innerdisbursion) + Selectivity innerdispersion) { HashPath *pathnode = makeNode(HashPath); @@ -550,7 +550,7 @@ create_hashjoin_path(RelOptInfo *joinrel, outer_path, inner_path, restrict_clauses, - innerdisbursion); + innerdispersion); return pathnode; } |