Re: Multivariate MCV list vs. statistics target

2020-09-05 Thread Justin Pryzby
I think the docs are inconsistent with the commit message and the code (d06215d03) and docs should be corrected, soemthing like so: diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index b135c89005..cd10a6a6fc 100644 --- a/doc/src/sgml/catalogs.sgml +++

Re: Multivariate MCV list vs. statistics target

2020-03-18 Thread Tomas Vondra
On Wed, Mar 18, 2020 at 01:32:19PM +, Shinoda, Noriyoshi (PN Japan A Delivery) wrote: Hi, Thanks for the report. Yes, this is clearly an omission. I think it would be better to use wording >similar to attstattarget, per the attached patch. That is, without reference to ALTER STATISTICS and

RE: Multivariate MCV list vs. statistics target

2020-03-18 Thread Shinoda, Noriyoshi (PN Japan A Delivery)
s Munro ; Jamison, Kirk ; Dean Rasheed ; PostgreSQL Hackers Subject: Re: Multivariate MCV list vs. statistics target Hi, On Wed, Mar 18, 2020 at 04:28:34AM +, Shinoda, Noriyoshi (PN Japan A Delivery) wrote: >Hello, > >I found a missing column description in the pg_sta

Re: Multivariate MCV list vs. statistics target

2020-03-18 Thread Tomas Vondra
Hackers Subject: Re: Multivariate MCV list vs. statistics target On Tue, Sep 03, 2019 at 02:38:56PM -0400, Alvaro Herrera wrote: On 2019-Aug-01, Tomas Vondra wrote: I'll move it to the next CF. Aside from the issues pointed by Kyotaro-san in his review, I still haven't made my mind about whether

RE: Multivariate MCV list vs. statistics target

2020-03-17 Thread Shinoda, Noriyoshi (PN Japan A Delivery)
Shinoda -Original Message- From: Tomas Vondra [mailto:tomas.von...@2ndquadrant.com] Sent: Wednesday, September 11, 2019 7:28 AM To: Alvaro Herrera Cc: Thomas Munro ; Jamison, Kirk ; Dean Rasheed ; PostgreSQL Hackers Subject: Re: Multivariate MCV list vs. statistics target On Tue, Sep 03

Re: Multivariate MCV list vs. statistics target

2019-09-10 Thread Tomas Vondra
On Tue, Sep 03, 2019 at 02:38:56PM -0400, Alvaro Herrera wrote: On 2019-Aug-01, Tomas Vondra wrote: I'll move it to the next CF. Aside from the issues pointed by Kyotaro-san in his review, I still haven't made my mind about whether to base the use statistics targets set for the attributes.

Re: Multivariate MCV list vs. statistics target

2019-09-03 Thread Alvaro Herrera
On 2019-Aug-01, Tomas Vondra wrote: > I'll move it to the next CF. Aside from the issues pointed by Kyotaro-san > in his review, I still haven't made my mind about whether to base the use > statistics targets set for the attributes. That's what we're doing now, > but I'm not sure it's a good idea

Re: Multivariate MCV list vs. statistics target

2019-08-01 Thread Dean Rasheed
On Thu, 1 Aug 2019 at 11:30, Tomas Vondra wrote: > > I'll move it to the next CF. Aside from the issues pointed by Kyotaro-san > in his review, I still haven't made my mind about whether to base the use > statistics targets set for the attributes. That's what we're doing now, > but I'm not sure

Re: Multivariate MCV list vs. statistics target

2019-08-01 Thread Tomas Vondra
On Thu, Aug 01, 2019 at 05:25:31PM +1200, Thomas Munro wrote: On Thu, Aug 1, 2019 at 12:16 PM Jamison, Kirk wrote: > On Saturday, July 27, 2019 7:06 AM(GMT+9), Tomas Vondra wrote: > > On Fri, Jul 26, 2019 at 07:03:41AM +, Jamison, Kirk wrote: > > >Overall, the patch is almost already in

Re: Multivariate MCV list vs. statistics target

2019-08-01 Thread Kyotaro Horiguchi
Hello. At Thu, 1 Aug 2019 00:15:48 +, "Jamison, Kirk" wrote in > The patch does not apply anymore. > In addition to the whitespace detected, > kindly rebase the patch as there were changes from recent commits > in the following files: >src/backend/commands/analyze.c >

Re: Multivariate MCV list vs. statistics target

2019-07-31 Thread Thomas Munro
On Thu, Aug 1, 2019 at 12:16 PM Jamison, Kirk wrote: > > On Saturday, July 27, 2019 7:06 AM(GMT+9), Tomas Vondra wrote: > > > On Fri, Jul 26, 2019 at 07:03:41AM +, Jamison, Kirk wrote: > > > >Overall, the patch is almost already in good shape for commit. > > > >I'll wait for the next update.

RE: Multivariate MCV list vs. statistics target

2019-07-31 Thread Jamison, Kirk
Hi, > From: Jamison, Kirk [mailto:k.jami...@jp.fujitsu.com] > Sent: Monday, July 29, 2019 10:53 AM > To: 'Tomas Vondra' > Cc: Dean Rasheed ; PostgreSQL Hackers > > Subject: RE: Multivariate MCV list vs. statistics target > > On Saturday, July 27, 2019 7:06 AM(GM

RE: Multivariate MCV list vs. statistics target

2019-07-28 Thread Jamison, Kirk
On Saturday, July 27, 2019 7:06 AM(GMT+9), Tomas Vondra wrote: > On Fri, Jul 26, 2019 at 07:03:41AM +, Jamison, Kirk wrote: > >On Sat, July 20, 2019 8:12 AM (GMT+9), Tomas Vondra wrote: > > > >> >+ /* XXX What if the target is set to 0? Reset the statistic? > >> */ > >> > > >> >This

Re: Multivariate MCV list vs. statistics target

2019-07-26 Thread Tomas Vondra
On Fri, Jul 26, 2019 at 07:03:41AM +, Jamison, Kirk wrote: On Sat, July 20, 2019 8:12 AM (GMT+9), Tomas Vondra wrote: >+ /* XXX What if the target is set to 0? Reset the statistic? */ > >This also makes me wonder. I haven't looked deeply into the code, but >since 0 is a valid

RE: Multivariate MCV list vs. statistics target

2019-07-26 Thread Jamison, Kirk
On Sat, July 20, 2019 8:12 AM (GMT+9), Tomas Vondra wrote: > >+/* XXX What if the target is set to 0? Reset the statistic? > */ > > > >This also makes me wonder. I haven't looked deeply into the code, but > >since 0 is a valid value, I believe it should reset the stats. > > I agree

Re: Multivariate MCV list vs. statistics target

2019-07-19 Thread Tomas Vondra
On Fri, Jul 19, 2019 at 06:12:20AM +, Jamison, Kirk wrote: On Tuesday, July 9, 2019, Tomas Vondra wrote: >apparently v1 of the ALTER STATISTICS patch was a bit confused about >length of the VacAttrStats array passed to statext_compute_stattarget, >causing segfaults. Attached v2 patch fixes

RE: Multivariate MCV list vs. statistics target

2019-07-19 Thread Jamison, Kirk
On Tuesday, July 9, 2019, Tomas Vondra wrote: > >apparently v1 of the ALTER STATISTICS patch was a bit confused about > >length of the VacAttrStats array passed to statext_compute_stattarget, > >causing segfaults. Attached v2 patch fixes that, and it also makes sure > >we print warnings about

Re: Multivariate MCV list vs. statistics target

2019-07-08 Thread Tomas Vondra
On Sun, Jul 07, 2019 at 12:02:38AM +0200, Tomas Vondra wrote: Hi, apparently v1 of the ALTER STATISTICS patch was a bit confused about length of the VacAttrStats array passed to statext_compute_stattarget, causing segfaults. Attached v2 patch fixes that, and it also makes sure we print warnings

Re: Multivariate MCV list vs. statistics target

2019-07-06 Thread Tomas Vondra
Hi, apparently v1 of the ALTER STATISTICS patch was a bit confused about length of the VacAttrStats array passed to statext_compute_stattarget, causing segfaults. Attached v2 patch fixes that, and it also makes sure we print warnings about ignored statistics only once. regards -- Tomas Vondra

Re: Multivariate MCV list vs. statistics target

2019-06-30 Thread David Rowley
On Fri, 21 Jun 2019 at 19:09, Dean Rasheed wrote: > Hmm, maybe. I can certainly understand your dislike of using text[]. > I'm not sure that we can confidently say that multivariate statistics > won't ever need additional tuning knobs, but I have no idea at the > moment what they might be, and

Re: Multivariate MCV list vs. statistics target

2019-06-29 Thread Tomas Vondra
On Fri, Jun 21, 2019 at 08:09:18AM +0100, Dean Rasheed wrote: On Thu, 20 Jun 2019 at 23:12, Tomas Vondra wrote: On Thu, Jun 20, 2019 at 08:08:44AM +0100, Dean Rasheed wrote: >On Tue, 18 Jun 2019 at 22:34, Tomas Vondra wrote: >> >> So I'm thinking we should allow tweaking the statistics for

Re: Multivariate MCV list vs. statistics target

2019-06-21 Thread Dean Rasheed
On Thu, 20 Jun 2019 at 23:12, Tomas Vondra wrote: > > On Thu, Jun 20, 2019 at 08:08:44AM +0100, Dean Rasheed wrote: > >On Tue, 18 Jun 2019 at 22:34, Tomas Vondra > >wrote: > >> > >> So I'm thinking we should allow tweaking the statistics for extended > >> stats, and serialize it in the

Re: Multivariate MCV list vs. statistics target

2019-06-20 Thread Tomas Vondra
On Thu, Jun 20, 2019 at 08:08:44AM +0100, Dean Rasheed wrote: On Tue, 18 Jun 2019 at 22:34, Tomas Vondra wrote: One slightly inconvenient thing I realized while playing with the address data set is that it's somewhat difficult to set the desired size of the multi-column MCV list. At the