[postgis-users] Queries slow after PostGIS upgrade
Sandro Santilli
strk at kbt.io
Thu Nov 3 10:18:12 PDT 2022
On Tue, Nov 01, 2022 at 10:07:34AM +0100, Chris Mair wrote:
> So the problem here was an optimization introduced in Postgres 12, in your case it did more harm than good:
> https://www.postgresql.org/docs/12/release-12.html#id-1.11.6.17.5.3.4
>
> Quote:
>
> Specifically, CTEs are automatically inlined [...] Inlining can be prevented by specifying MATERIALIZED [...]
> Previously, CTEs were never inlined [...]
I've been stroke by this issue multiple times. Making the default
different from previous versions was probably a mistake here...
--strk;
More information about the postgis-users
mailing list