Re: query slowdown after 9.0 -> 9.4 migration - Mailing list pgsql-performance

From Andreas Kretschmer
Subject Re: query slowdown after 9.0 -> 9.4 migration
Date
Msg-id 20161027053838.GA5952@tux
Whole thread Raw
In response to Re: query slowdown after 9.0 -> 9.4 migration  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: query slowdown after 9.0 -> 9.4 migration
List pgsql-performance
Tomas Vondra <tomas.vondra@2ndquadrant.com> 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


pgsql-performance by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: query slowdown after 9.0 -> 9.4 migration
Next
From: Craig James
Date:
Subject: limit 1 on view never finishes