Content-Length: 287622 | pFad | http://github.com/postgrespro/postgres_cluster/commit/da2322883b9e50b1aac70a3b6eaf2a4f0e486469

E4 Fix typos in README.dependencies · postgrespro/postgres_cluster@da23228 · GitHub
Skip to content

Commit da23228

Browse files
committed
Fix typos in README.dependencies
There was a logic error in a formula, reported by Atsushi Torokoshi. Ashutosh Bapat furthermore recommended to change notation for a variable that was re-using a letter from a previous formula, though his proposed patch contained a small error in attributing what the new letter is for. Also, instead of his proposed d' I ended up using e, to avoid confusing the reader with quotes which are used differently in the explaining prose. Bugs appeared in commit 2686ee1. Reported-by: Atsushi Torikoshi, Ashutosh Bapat Discussion: https://postgr.es/m/CAFjFpRd03YojT4wyuDcjhCfYuygfWfnt68XGn2CKv=rcjRCtTA@mail.gmail.com
1 parent 82c1507 commit da23228

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/backend/statistics/README.dependencies

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,21 @@ to break the consistency.
7979
Clause reduction (planner/optimizer)
8080
------------------------------------
8181

82-
Applying the functional dependencies is fairly simple - given a list of
82+
Applying the functional dependencies is fairly simple: given a list of
8383
equality clauses, we compute selectivities of each clause and then use the
8484
degree to combine them using this formula
8585

8686
P(a=?,b=?) = P(a=?) * (d + (1-d) * P(b=?))
8787

88-
Where 'd' is the degree of functional dependence (a=>b).
88+
Where 'd' is the degree of functional dependency (a => b).
8989

9090
With more than two equality clauses, this process happens recursively. For
91-
example for (a,b,c) we first use (a,b=>c) to break the computation into
91+
example for (a,b,c) we first use (a,b => c) to break the computation into
9292

93-
P(a=?,b=?,c=?) = P(a=?,b=?) * (d + (1-d)*P(b=?))
93+
P(a=?,b=?,c=?) = P(a=?,b=?) * (e + (1-e) * P(c=?))
9494

95-
and then apply (a=>b) the same way on P(a=?,b=?).
95+
where 'e' is the degree of functional dependency (a,b => c); then we can
96+
apply (a=>b) the same way on P(a=?,b=?).
9697

9798

9899
Consistency of clauses

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/da2322883b9e50b1aac70a3b6eaf2a4f0e486469

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy