Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crV7Y-0003oW-7T for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Mar 2017 19:43:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1crV7X-0006z8-QH for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Mar 2017 19:43:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1crV7W-0006yz-Tg for pgsql-hackers@postgresql.org; Fri, 24 Mar 2017 19:43:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1crV7U-0005a1-Fh for pgsql-hackers@postgresql.org; Fri, 24 Mar 2017 19:43:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v2OJhUht009096; Fri, 24 Mar 2017 15:43:30 -0400 From: Tom Lane To: Alvaro Herrera cc: Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: Re: [COMMITTERS] pgsql: Implement multivariate n-distinct coefficients In-reply-to: <20170324192118.7cvlqhfx6p5ecdnd@alvherre.pgsql> References: <20170324192118.7cvlqhfx6p5ecdnd@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 24 Mar 2017 16:21:18 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9094.1490384610.1@sss.pgh.pa.us> Date: Fri, 24 Mar 2017 15:43:30 -0400 Message-ID: <9095.1490384610@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Alvaro Herrera 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers