Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YfcxW-0005rL-7J for pgsql-performance@arkaria.postgresql.org; Tue, 07 Apr 2015 23:31:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YfcxV-0000lp-Ic for pgsql-performance@arkaria.postgresql.org; Tue, 07 Apr 2015 23:31:05 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YfcxU-0000lZ-Jx for pgsql-performance@postgresql.org; Tue, 07 Apr 2015 23:31:04 +0000 Received: from mail-by2on0646.outbound.protection.outlook.com ([2a01:111:f400:fc0c::646] helo=na01-by2-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YfcxI-00075b-Pz for pgsql-performance@postgresql.org; Tue, 07 Apr 2015 23:31:02 +0000 Received: from decina.local (70.113.16.71) by BY2PR11MB0678.namprd11.prod.outlook.com (25.163.111.20) with Microsoft SMTP Server (TLS) id 15.1.130.23; Tue, 7 Apr 2015 23:30:46 +0000 Message-ID: <552468A3.9090004@BlueTreble.com> Date: Tue, 7 Apr 2015 18:30:43 -0500 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Tom Lane , Kevin Grittner CC: "Carson, Leonard" , "pgsql-performance@postgresql.org" Subject: Re: views much slower in 9.3 than 8.4 References: <1174.1427562844@sss.pgh.pa.us> <1760411806.1238053.1427726764629.JavaMail.yahoo@mail.yahoo.com> <15849.1427730729@sss.pgh.pa.us> In-Reply-To: <15849.1427730729@sss.pgh.pa.us> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [70.113.16.71] X-ClientProxiedBy: SN1PR07CA0034.namprd07.prod.outlook.com (25.162.170.172) To BY2PR11MB0678.namprd11.prod.outlook.com (25.163.111.20) Authentication-Results: postgresql.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR11MB0678; X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(377454003)(479174004)(24454002)(51704005)(23746002)(83506001)(42186005)(50466002)(33656002)(15975445007)(47776003)(122386002)(62966003)(77156002)(66066001)(86362001)(40100003)(65956001)(92566002)(87976001)(50986999)(87266999)(19580395003)(64126003)(54356999)(46102003)(76176999)(36756003)(2950100001)(19580405001)(80316001)(85282002)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR11MB0678; H:decina.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006); SRVR:BY2PR11MB0678; BCL:0; PCL:0; RULEID:; SRVR:BY2PR11MB0678; X-Forefront-PRVS: 0539EEBD11 X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2015 23:30:46.6418 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR11MB0678 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 3/30/15 10:52 AM, Tom Lane wrote: > Kevin Grittner writes: >> >Tom Lane wrote: >>> >>But the other problem is that the planner considers less-than-1% >>> >>differences in cost estimates to be "in the noise", which means >>> >>that it's not going to consider cost differences of less than >>> >>1480 units in the remaining join steps to be significant. This >>> >>is how come we end up with the apparently brain-dead decisions to >>> >>use seqscans on some of the other tables such as "pi" and "ac": >>> >>comparing the seqscan to a potential inner indexscan, the total >>> >>cost of the join is "the same" according to the 1% rule, >> >The 1% rule itself might be something to add to the R&D list. > Perhaps. But it does make for a significant difference in planner speed, > and I would argue that any case where it really hurts is by definition > a cost estimation failure somewhere else. What I wish we had was some way to represent "confidence" in the accuracy of a specific plan node, with the goal of avoiding plans that cost out slightly cheaper but if we guessed wrong on something will blow up spectacularly. Nested loops are an example; if you miscalculate either of the sides by very much you can end up with a real mess unless the rowcounts were already pretty trivial to begin with. -- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance