Re: [HACKERS] multivariate statistics / patch v7

2015-09-24 Thread Tomas Vondra
Hi, On 09/24/2015 06:43 PM, Josh Berkus wrote: Tomas, attached is v7 of the multivariate stats patch. The main improvement is major refactoring of the clausesel.c portion - splitting the awfully long spaghetti-style functions into smaller pieces, making it much more understandable etc. So pr

Re: [HACKERS] multivariate statistics / patch v7

2015-09-24 Thread Josh Berkus
Tomas, > attached is v7 of the multivariate stats patch. The main improvement is > major refactoring of the clausesel.c portion - splitting the awfully > long spaghetti-style functions into smaller pieces, making it much more > understandable etc. So presumably v7 handles varlena attributes as we

Re: [HACKERS] multivariate statistics / patch v7

2015-08-25 Thread Michael Paquier
On Fri, Jul 31, 2015 at 6:28 AM, Tomas Vondra wrote: > [series of arguments] > > If you need stats without these "issues" you'll have to use MCV list or a > histogram. Trying to fix the simple statistics types is futile, IMHO. Patch is marked as returned with feedback. There has been advanced dis

Re: [HACKERS] multivariate statistics / patch v7

2015-07-30 Thread Tomas Vondra
Hi, On 07/30/2015 06:58 PM, Heikki Linnakangas wrote: The problem with a threshold is that around that threshold, even a small change in the data set can drastically change the produced estimates. For example, imagine that we know from the stats that zip code implies city. But then someone adds

Re: [HACKERS] multivariate statistics / patch v7

2015-07-30 Thread Heikki Linnakangas
On 07/30/2015 03:55 PM, Tomas Vondra wrote: On 07/30/2015 10:21 AM, Heikki Linnakangas wrote: I have some doubts about the clause reduction and functional dependencies part of this. It seems to treat functional dependency as a boolean property, but even with the classic zipcode and city case, it

Re: [HACKERS] multivariate statistics / patch v7

2015-07-30 Thread Tomas Vondra
Hi, On 07/30/2015 10:21 AM, Heikki Linnakangas wrote: On 05/25/2015 11:43 PM, Tomas Vondra wrote: There are 6 files attached, but only 0002-0006 are actually part of the multivariate statistics patch itself. All of these patches are huge. In order to review this in a reasonable amount of time

Re: [HACKERS] multivariate statistics / patch v7

2015-07-30 Thread Heikki Linnakangas
On 05/25/2015 11:43 PM, Tomas Vondra wrote: There are 6 files attached, but only 0002-0006 are actually part of the multivariate statistics patch itself. All of these patches are huge. In order to review this in a reasonable amount of time, we need to do this in several steps. So let's see wha

Re: [HACKERS] multivariate statistics / patch v7

2015-07-27 Thread Tomas Vondra
Hello Horiguchi-san, On 07/27/2015 09:04 AM, Kyotaro HORIGUCHI wrote: Hello, At Sat, 25 Jul 2015 23:09:31 +0200, Tomas Vondra wrote in <55b3fb0b.7000...@2ndquadrant.com> Hi, On 07/16/2015 01:51 PM, Kyotaro HORIGUCHI wrote: Hi, I'd like to show you the modified constitution of multivariate

Re: [HACKERS] multivariate statistics / patch v7

2015-07-27 Thread Kyotaro HORIGUCHI
Hello, At Sat, 25 Jul 2015 23:09:31 +0200, Tomas Vondra wrote in <55b3fb0b.7000...@2ndquadrant.com> > Hi, > > On 07/16/2015 01:51 PM, Kyotaro HORIGUCHI wrote: > > Hi, I'd like to show you the modified constitution of > > multivariate statistics application logic. Please find the > > attached. T

Re: [HACKERS] multivariate statistics / patch v7

2015-07-25 Thread Tomas Vondra
Hi, On 07/16/2015 01:51 PM, Kyotaro HORIGUCHI wrote: Hi, I'd like to show you the modified constitution of multivariate statistics application logic. Please find the attached. They apply on your v7 patch. Sadly I do have some trouble getting it to apply correctly :-( So for now all my comments

Re: [HACKERS] multivariate statistics / patch v7

2015-07-14 Thread Tomas Vondra
Hi, On 07/13/2015 10:51 AM, Kyotaro HORIGUCHI wrote: Ok, I understood the diferrence between what I thought and what you say. The code is actually concious of OR clause but is looks somewhat confused. I'm not sure which part is confused by the OR clauses, but it's certainly possible. Initial

Re: [HACKERS] multivariate statistics / patch v7

2015-07-13 Thread Kyotaro HORIGUCHI
Hi, Thanks for the detailed explaination. I misunderstood the code (more honest speaking, din't look so close there). Then I looked it closer. At Wed, 08 Jul 2015 03:03:16 +0200, Tomas Vondra wrote in <559c76d4.2030...@2ndquadrant.com> > FWIW this was a stupid bug in update_match_bitmap_histogr

Re: [HACKERS] multivariate statistics / patch v7

2015-07-07 Thread Tomas Vondra
Hello Horiguchi-san! On 07/07/2015 09:43 PM, Tomas Vondra wrote: -- histograms ALTER TABLE t ADD STATISTICS (histogram) on (a,b,c); ANALYZE t; EXPLAIN ANALYZE select * from t where a < 0.3 and b < 0.3 and c < 0.3; Seq Scan on t (cost=0.00..23870.00 rows=267033 width=24) (actual

Re: [HACKERS] multivariate statistics / patch v7

2015-07-07 Thread Tomas Vondra
Hi, On 07/07/2015 08:05 AM, Kyotaro HORIGUCHI wrote: Hi, Tomas. I'll kick the gas pedal. Thank you, it looks clearer. I have some comment for the brief look at this. This patchset is relatively large so I will comment on "per-notice" basis.. which means I'll send comment before examining the e

Re: [HACKERS] multivariate statistics / patch v7

2015-07-06 Thread Kyotaro HORIGUCHI
Hi, Tomas. I'll kick the gas pedal. > > Thank you, it looks clearer. I have some comment for the brief look > > at this. This patchset is relatively large so I will comment on > > "per-notice" basis.. which means I'll send comment before examining > > the entire of this patchset. Sorry in advance

Re: [HACKERS] multivariate statistics / patch v7

2015-07-04 Thread Tomas Vondra
Hello Horiguchi-san! On 07/03/2015 07:30 AM, Kyotaro HORIGUCHI wrote: Hello, I started to work on this patch. attached is v7 of the multivariate stats patch. The main improvement is major refactoring of the clausesel.c portion - splitting the awfully long spaghetti-style functions into smaller

Re: [HACKERS] multivariate statistics / patch v7

2015-07-02 Thread Kyotaro HORIGUCHI
Hello, I started to work on this patch. > attached is v7 of the multivariate stats patch. The main improvement > is major refactoring of the clausesel.c portion - splitting the > awfully long spaghetti-style functions into smaller pieces, making it > much more understandable etc. Thank you, it lo