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

Commitda23228

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 variablethat was re-using a letter from a previous formula, though his proposedpatch 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 confusingthe reader with quotes which are used differently in the explainingprose.Bugs appeared in commit2686ee1.Reported-by: Atsushi Torikoshi, Ashutosh BapatDiscussion:https://postgr.es/m/CAFjFpRd03YojT4wyuDcjhCfYuygfWfnt68XGn2CKv=rcjRCtTA@mail.gmail.com
1 parent82c1507 commitda23228

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 functionaldependence (a=>b).
88+
Where 'd' is the degree of functionaldependency (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)

[8]ページ先頭

©2009-2025 Movatter.jp