Re: Re: [COMMITTERS] pgsql: Implement multivariate n-distinct coefficients

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Implement multivariate n-distinct coefficients
Date: 2017-03-24 19:43:30
Message-ID: 9095.1490384610@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> Tom Lane wrote:
>> Why not use COSTS OFF? Or I'll put that even more strongly: all the
>> existing regression tests use COSTS OFF, exactly to avoid this sort of
>> machine-dependent output. There had better be a really damn good
>> reason not to use it here.

> If we use COSTS OFF, the test is completely pointless, as the plans look
> identical regardless of whether the multivariate stats are being used or
> not.

Well, I think you are going to find that the exact costs are far too
fragile to have in the regression test output. Just because you wish
you could test them this way doesn't mean you can.

> If we had a ROWS option to ANALYZE that showed estimated number of rows
> but not the cost, that would be an option.

Unlikely to be any better. All these numbers are subject to lots of
noise, eg due to auto-analyze happening at unexpected times, random
sampling during analyze, etc. If you try to constrain the test case
enough that none of that happens, I wonder how useful it will really be.

What I would suggest is devising a test case whereby you actually
get a different plan shape now than you did before. That shouldn't
be too terribly hard, or else what was the point?

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2017-03-24 20:21:41 pgsql: Fix typo in comment
Previous Message Alvaro Herrera 2017-03-24 19:35:54 pgsql: Fix stats_ext test in 32 bit machines

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Sharma 2017-03-24 19:44:24 Re: pageinspect and hash indexes
Previous Message Fujii Masao 2017-03-24 19:40:24 Re: pg_stat_wal_write statistics view