Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cCb78-0003gB-2o for pgsql-performance@arkaria.postgresql.org; Thu, 01 Dec 2016 23:50:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cCb77-0004rZ-KC for pgsql-performance@arkaria.postgresql.org; Thu, 01 Dec 2016 23:50:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cCb5S-0002vO-8N for pgsql-performance@postgresql.org; Thu, 01 Dec 2016 23:48:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cCb5P-0000YZ-KW for pgsql-performance@postgresql.org; Thu, 01 Dec 2016 23:48:21 +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 uB1NmCD6021407; Thu, 1 Dec 2016 18:48:12 -0500 From: Tom Lane To: Bill Measday cc: pgsql-performance@postgresql.org Subject: Re: Substantial different index use between 9.5 and 9.6 In-reply-to: References: Comments: In-reply-to Bill Measday message dated "Fri, 02 Dec 2016 10:38:50 +1100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21405.1480636092.1@sss.pgh.pa.us> Date: Thu, 01 Dec 2016 18:48:12 -0500 Message-ID: <21406.1480636092@sss.pgh.pa.us> X-Pg-Spam-Score: -4.8 (----) 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 Bill Measday writes: > Substantial different index use between 9.5 and 9.6 Maybe you missed an ANALYZE after migrating? The plan difference seems to be due to a vast difference in rowcount estimate for the m_elevations condition: > -> Bitmap Heap Scan on m_elevations e > (cost=282802.21..37401439.43 rows=3512160 width=8) > -> Seq Scan on m_elevations e > (cost=10000000000.00..13296950520.12 rows=3512159563 width=8) If you don't know where that factor-of-1000 came from, maybe take it up with the postgis folk. It'd mostly be coming out of their selectivity estimation routines. 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