Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1ZRJ-00063y-0D for pgsql-general@arkaria.postgresql.org; Thu, 29 Mar 2018 15:26:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f1ZRH-0002VL-HK for pgsql-general@arkaria.postgresql.org; Thu, 29 Mar 2018 15:26:07 +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.89) (envelope-from ) id 1f1ZRH-0002VB-5c for pgsql-general@lists.postgresql.org; Thu, 29 Mar 2018 15:26:07 +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.89) (envelope-from ) id 1f1ZRA-0008LO-Bq for pgsql-general@postgresql.org; Thu, 29 Mar 2018 15:26:05 +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 w2TFPvZL028563; Thu, 29 Mar 2018 11:25:57 -0400 From: Tom Lane To: Cory Tucker cc: David Rowley , "pgsql-general@postgresql.org" Subject: Re: Bad Query Plans on 10.3 vs 9.6 In-reply-to: References: <13699.1522331221@sss.pgh.pa.us> Comments: In-reply-to Cory Tucker message dated "Thu, 29 Mar 2018 15:08:49 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28561.1522337157.1@sss.pgh.pa.us> Date: Thu, 29 Mar 2018 11:25:57 -0400 Message-ID: <28562.1522337157@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Cory Tucker writes: > relallvisible has a value of 0 for that table on both databases. That would result in IOS being estimated at the same cost as a regular indexscan, I believe, or very close to that anyway. Is the 10.3 plan parallelized at all? It's possible that the planner thinks a parallel seqscan is faster than a nonparallel indexscan (AFAIR, v10 doesn't have parallel indexscan). The other likely explanation is simply that indexscanning a partitioned table is not considered, or not correctly costed. I'm not very sure what the state of that code is, but certainly all the v10 partitioning logic is still pretty wet behind the ears. regards, tom lane