Fix a typo in README.dependencies
Hi,
I found below formula to compute selectivities, but
I think the last Probability 'P(b=?)' should be 'P(c=?)'.
P(a=?,b=?,c=?) = P(a=?,b=?) * (d + (1-d)*P(b=?))
Attached patch fixes it, and it also adds some spaces
following another formula which is on line 86 and
computes P(a=?, b=?).
Regards,
--
Atsushi Torikoshi
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
Attachments:
fix_typo_in_README.dependenciestext/plain; charset=UTF-8; name=fix_typo_in_README.dependenciesDownload
diff --git a/src/backend/statistics/README.dependencies b/src/backend/statistics/README.dependencies
index 59f9d57..d10e4d0 100644
--- a/src/backend/statistics/README.dependencies
+++ b/src/backend/statistics/README.dependencies
@@ -90,7 +90,7 @@ Where 'd' is the degree of functional dependence (a=>b).
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
- P(a=?,b=?,c=?) = P(a=?,b=?) * (d + (1-d)*P(b=?))
+ P(a=?,b=?,c=?) = P(a=?,b=?) * (d + (1-d) * P(c=?))
and then apply (a=>b) the same way on P(a=?,b=?).
On Mon, Jun 5, 2017 at 8:22 AM, atorikoshi
<torikoshi_atsushi_z2@lab.ntt.co.jp> wrote:
Hi,
I found below formula to compute selectivities, but
I think the last Probability 'P(b=?)' should be 'P(c=?)'.P(a=?,b=?,c=?) = P(a=?,b=?) * (d + (1-d)*P(b=?))
Attached patch fixes it, and it also adds some spaces
following another formula which is on line 86 and
computes P(a=?, b=?).
Agree. Also using "d" for "degree of functional dependence (b=>c) as
well is confusing. We are already using "d" for "degree of functional
dependence (a=>b). Here' patch to use "d'" instead of "d".
--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
Attachments:
fix_typo_in_README_v2.dependenciesapplication/octet-stream; name=fix_typo_in_README_v2.dependenciesDownload
diff --git a/src/backend/statistics/README.dependencies b/src/backend/statistics/README.dependencies
index 59f9d57..7e84192 100644
--- a/src/backend/statistics/README.dependencies
+++ b/src/backend/statistics/README.dependencies
@@ -90,7 +90,8 @@ Where 'd' is the degree of functional dependence (a=>b).
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
- P(a=?,b=?,c=?) = P(a=?,b=?) * (d + (1-d)*P(b=?))
+ P(a=?,b=?,c=?) = P(a=?,b=?) * (d' + (1-d') * P(c=?))
+(where d' is the degree of functional dependence (b=>c))
and then apply (a=>b) the same way on P(a=?,b=?).
Ashutosh Bapat wrote:
On Mon, Jun 5, 2017 at 8:22 AM, atorikoshi
<torikoshi_atsushi_z2@lab.ntt.co.jp> wrote:Hi,
I found below formula to compute selectivities, but
I think the last Probability 'P(b=?)' should be 'P(c=?)'.P(a=?,b=?,c=?) = P(a=?,b=?) * (d + (1-d)*P(b=?))
Attached patch fixes it, and it also adds some spaces
following another formula which is on line 86 and
computes P(a=?, b=?).Agree. Also using "d" for "degree of functional dependence (b=>c) as
well is confusing. We are already using "d" for "degree of functional
dependence (a=>b). Here' patch to use "d'" instead of "d".
Since the surrounding text uses single quotes to talk about each letter,
I thought it was better to use a new letter (e) so that we don't require
the "prime" notation, which would end up being either inconsistent,
confusing, stupid-looking, or combinations thereof.
Also, your proposed text had a slight mistake: it's not (b=>c) that
d' is for, but (a,b=>c).
Pushed with those corrections.
Thanks for the reports and patches!
--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Fri, Jun 23, 2017 at 2:58 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
Ashutosh Bapat wrote:
On Mon, Jun 5, 2017 at 8:22 AM, atorikoshi
<torikoshi_atsushi_z2@lab.ntt.co.jp> wrote:Hi,
I found below formula to compute selectivities, but
I think the last Probability 'P(b=?)' should be 'P(c=?)'.P(a=?,b=?,c=?) = P(a=?,b=?) * (d + (1-d)*P(b=?))
Attached patch fixes it, and it also adds some spaces
following another formula which is on line 86 and
computes P(a=?, b=?).Agree. Also using "d" for "degree of functional dependence (b=>c) as
well is confusing. We are already using "d" for "degree of functional
dependence (a=>b). Here' patch to use "d'" instead of "d".Since the surrounding text uses single quotes to talk about each letter,
I thought it was better to use a new letter (e) so that we don't require
the "prime" notation, which would end up being either inconsistent,
confusing, stupid-looking, or combinations thereof.
Makes sense.
Also, your proposed text had a slight mistake: it's not (b=>c) that
d' is for, but (a,b=>c).
Sorry for that.
Pushed with those corrections.
Thanks.
--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 2017/06/23 6:28, Alvaro Herrera wrote:
Ashutosh Bapat wrote:
On Mon, Jun 5, 2017 at 8:22 AM, atorikoshi
<torikoshi_atsushi_z2@lab.ntt.co.jp> wrote:Hi,
I found below formula to compute selectivities, but
I think the last Probability 'P(b=?)' should be 'P(c=?)'.P(a=?,b=?,c=?) = P(a=?,b=?) * (d + (1-d)*P(b=?))
Attached patch fixes it, and it also adds some spaces
following another formula which is on line 86 and
computes P(a=?, b=?).Agree. Also using "d" for "degree of functional dependence (b=>c) as
well is confusing. We are already using "d" for "degree of functional
dependence (a=>b). Here' patch to use "d'" instead of "d".Since the surrounding text uses single quotes to talk about each letter,
I thought it was better to use a new letter (e) so that we don't require
the "prime" notation, which would end up being either inconsistent,
confusing, stupid-looking, or combinations thereof.Also, your proposed text had a slight mistake: it's not (b=>c) that
d' is for, but (a,b=>c).Pushed with those corrections.
Thanks for the reports and patches!
Thanks!
--
Atsushi Torikoshi
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers