Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzdOo-0003Tv-TQ for pgsql-performance@arkaria.postgresql.org; Thu, 27 Oct 2016 05:38:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bzdOo-0005Kz-GB for pgsql-performance@arkaria.postgresql.org; Thu, 27 Oct 2016 05:38:46 +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 1bzdOn-0005It-Ox for pgsql-performance@postgresql.org; Thu, 27 Oct 2016 05:38:45 +0000 Received: from mailout01.ims-firmen.de ([213.174.32.96]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bzdOk-0000Qm-Ce for pgsql-performance@postgresql.org; Thu, 27 Oct 2016 05:38:44 +0000 Received: from mailin04.ims-firmen.de ([192.168.1.144]) by mailout01.ims-firmen.de with esmtp (envelope-from ) id 1bzdOh-0000Zz-gC for pgsql-performance@postgresql.org; Thu, 27 Oct 2016 07:38:39 +0200 Received: from [79.204.162.77] (helo=a-kretschmer.de) by mailin04.ims-firmen.de with esmtpsa (TLSv1:AES256-SHA:256) (envelope-from ) id 1bzdOg-0005Xl-Cn for pgsql-performance@postgresql.org; Thu, 27 Oct 2016 07:38:39 +0200 Received: from kretschmer by a-kretschmer.de with local (Exim 4.69) (envelope-from ) id 1bzdOg-0001ie-Ed for pgsql-performance@postgresql.org; Thu, 27 Oct 2016 07:38:38 +0200 Date: Thu, 27 Oct 2016 07:38:38 +0200 From: Andreas Kretschmer To: pgsql-performance@postgresql.org Subject: Re: query slowdown after 9.0 -> 9.4 migration Message-ID: <20161027053838.GA5952@tux> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: Mutt/1.5.18 (2008-05-17) X-Pg-Spam-Score: -2.6 (--) 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 Tomas Vondra wrote: > On 10/26/2016 03:48 PM, Filip RembiaƂkowski wrote: >> Hi. >> >> Query run time degraded after migration from Pg 9.0 + postgis 1.5 to Pg >> 9.4 + postgis 2.2. >> EXPLAIN shows heap scan cost increase. What can be the reason for >> 40-fold increase in page scans needed to run Bitmap Heap Scan with >> Filter and Recheck? >> > > On 9.0 the the scan accesses only 8 buffers: > > Buffers: shared hit=8 > > while on 9.4 it has to inspect 316 of them: > > Buffers: shared hit=316 nice point ;-) > > Perhaps the table is organized / sorted differently, or something like > that. How did you do the upgrade? Maybe table-bloat? Filip, check if autovacuum runs properly. Regards, Andreas Kretschmer -- Andreas Kretschmer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance