mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 18:51:20 +02:00
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 2686ee1b7c
.
Reported-by: Atsushi Torikoshi, Ashutosh Bapat
Discussion: https://postgr.es/m/CAFjFpRd03YojT4wyuDcjhCfYuygfWfnt68XGn2CKv=rcjRCtTA@mail.gmail.com
This commit is contained in:
parent
82c1507e30
commit
da2322883b
@ -79,20 +79,21 @@ to break the consistency.
|
|||||||
Clause reduction (planner/optimizer)
|
Clause reduction (planner/optimizer)
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
Applying the functional dependencies is fairly simple - given a list of
|
Applying the functional dependencies is fairly simple: given a list of
|
||||||
equality clauses, we compute selectivities of each clause and then use the
|
equality clauses, we compute selectivities of each clause and then use the
|
||||||
degree to combine them using this formula
|
degree to combine them using this formula
|
||||||
|
|
||||||
P(a=?,b=?) = P(a=?) * (d + (1-d) * P(b=?))
|
P(a=?,b=?) = P(a=?) * (d + (1-d) * P(b=?))
|
||||||
|
|
||||||
Where 'd' is the degree of functional dependence (a=>b).
|
Where 'd' is the degree of functional dependency (a => b).
|
||||||
|
|
||||||
With more than two equality clauses, this process happens recursively. For
|
With more than two equality clauses, this process happens recursively. For
|
||||||
example for (a,b,c) we first use (a,b=>c) to break the computation into
|
example for (a,b,c) we first use (a,b => c) to break the computation into
|
||||||
|
|
||||||
P(a=?,b=?,c=?) = P(a=?,b=?) * (d + (1-d)*P(b=?))
|
P(a=?,b=?,c=?) = P(a=?,b=?) * (e + (1-e) * P(c=?))
|
||||||
|
|
||||||
and then apply (a=>b) the same way on P(a=?,b=?).
|
where 'e' is the degree of functional dependency (a,b => c); then we can
|
||||||
|
apply (a=>b) the same way on P(a=?,b=?).
|
||||||
|
|
||||||
|
|
||||||
Consistency of clauses
|
Consistency of clauses
|
||||||
|
Loading…
Reference in New Issue
Block a user