Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YYjUN-0004TI-2N for pgsql-performance@arkaria.postgresql.org; Thu, 19 Mar 2015 23:04:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YYjUM-0007gy-DW for pgsql-performance@arkaria.postgresql.org; Thu, 19 Mar 2015 23:04:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YYjUL-0007gq-Jc for pgsql-performance@postgresql.org; Thu, 19 Mar 2015 23:04:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YYjUH-00006V-GH for pgsql-performance@postgresql.org; Thu, 19 Mar 2015 23:04:28 +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 t2JN4Mmw013023; Thu, 19 Mar 2015 19:04:22 -0400 From: Tom Lane To: "Carson, Leonard" cc: "pgsql-performance@postgresql.org" Subject: Re: views much slower in 9.3 than 8.4 In-reply-to: <66DCD6CD-90FC-4BD8-BF06-E7A4EB3005EC@ucsd.edu> References: <1265DCF8-67C3-4FF3-8737-B2798EE06E25@ucsd.edu> <9C8B9906-D76A-48EE-AED9-516AFD3A4725@ucsd.edu> <5424.1426718490@sss.pgh.pa.us> <66DCD6CD-90FC-4BD8-BF06-E7A4EB3005EC@ucsd.edu> Comments: In-reply-to "Carson, Leonard" message dated "Thu, 19 Mar 2015 17:24:47 -0000" Date: Thu, 19 Mar 2015 19:04:22 -0400 Message-ID: <13022.1426806262@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-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org "Carson, Leonard" writes: > Here are the 3 views and some timing notes: > http://pgsql.privatepaste.com/decae31693# That doesn't really leave us any wiser than before, unfortunately. It's clear that the root of the problem is the drastic underestimation of the size of the rq/a join, but it's not clear why that's happening, nor why 8.4 would not have fallen into the same trap. Would it be possible to provide the data in the join columns involved in that part of the query? To wit requests.account_id requests.start_date allocations.account_id allocations.initial_start_date allocations.resource_id regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance