Re: multivariate statistics v14

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: tomas(dot)vondra(at)2ndquadrant(dot)com
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, alvherre(at)2ndquadrant(dot)com, petr(at)2ndquadrant(dot)com, jeff(dot)janes(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: multivariate statistics v14
Date: 2016-03-30 05:15:39
Message-ID: 20160330.141539.2119002143413048092.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> with statistics without statistics
>> case1 0.98 0.01
>> case2 98/0 1/0
>
> The case2 shows that functional dependencies assume that the
> conditions used in queries won't be incompatible - that's something
> this type of statistics can't fix.

It would be nice if that's mentioned in the manual to avoid user's
confusion.

>> case3 1.05 0.01
>> case4 1/0 103/0
>> case5 18.50 18.33
>> case6 111123/0 1111123/0
>
> The last two lines (case5 + case6) seem a bit suspicious. I believe
> those are for the histogram data, and I do get these numbers:
>
> case5 0.93 (5517 / 5949) 42.0 (249943 / 5949)
> case6 100/0 100/0
>
> Perhaps you've been using the version before the bugfix, with ANALYZE
> on the wrong table?

You are right. I accidentally ANALYZE t2, not t3. Now I get these
numbers:

case5 1.23 (7367 / 5968) 41.7 (249118 / 5981)
case6 117/0 162092/0

>> 2) following comments by me are not addressed in the v18 patch.
>>
>>> - There's no docs for pg_mv_statistic (should be added to "49. System
>>> Catalogs")
>>>
>>> - The word "multivariate statistics" or something like that should
>>> appear in the index.
>>>
>>> - There are some explanation how to deal with multivariate statistics
>>> in "14.1 Using Explain" and "14.2 Statistics used by the Planner"
>>> section.
>
> Yes, those are valid omissions. I plan to address them, and I'd also
> considering adding a section to 65.1 (How the Planner Uses
> Statistics), explaining more thoroughly how the planner uses
> multivariate stats.

Great.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2016-03-30 05:48:15 Re: IF (NOT) EXISTS in psql-completion
Previous Message Amit Kapila 2016-03-30 04:55:46 Re: OOM in libpq and infinite loop with getCopyStart()