Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIJ5y-0006BJ-6k for pgsql-bugs@arkaria.postgresql.org; Sat, 17 Dec 2016 17:48:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cIJ5x-0003G4-HX for pgsql-bugs@arkaria.postgresql.org; Sat, 17 Dec 2016 17:48:29 +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 1cIJ5w-0003FX-C9 for pgsql-bugs@postgresql.org; Sat, 17 Dec 2016 17:48:28 +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 1cIJ5t-0004Hj-5q for pgsql-bugs@postgresql.org; Sat, 17 Dec 2016 17:48:27 +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 uBHHmMCT026143; Sat, 17 Dec 2016 12:48:22 -0500 From: Tom Lane To: Alexey Ermakov cc: maxim.boguk@gmail.com, pgsql-bugs@postgresql.org Subject: Re: BUG #14469: Wrong cost estimates for merge append plan with partitions. In-reply-to: <585522b7.4391190a.fcd8e.a4ed@mx.google.com> References: <20161217105346.13336.97087@wrigleys.postgresql.org> <585522b7.4391190a.fcd8e.a4ed@mx.google.com> Comments: In-reply-to Alexey Ermakov message dated "Sat, 17 Dec 2016 17:34:13 +0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26141.1481996902.1@sss.pgh.pa.us> Date: Sat, 17 Dec 2016 12:48:22 -0500 Message-ID: <26142.1481996902@sss.pgh.pa.us> X-Pg-Spam-Score: -5.0 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Alexey Ermakov writes: > I think we should change that estimation and in case when child node > expected to return only one row (and really 0 rows) we should use it's > total_cost as base for estimation of startup_cost. This would make sense as part of the overall rethinking of startup_cost discussed in https://www.postgresql.org/message-id/flat/31065.1481742760%40sss.pgh.pa.us but I'm disinclined to do it in isolation. Redefining startup_cost for just one path type seems likely to create more problems than it solves. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs