[postgis-tickets] [PostGIS] #4732: long planning time
PostGIS
trac at osgeo.org
Mon Aug 17 00:46:36 PDT 2020
#4732: long planning time
--------------------------+---------------------------
Reporter: michal | Owner: pramsey
Type: enhancement | Status: closed
Priority: low | Milestone: PostGIS 3.1.0
Component: postgis | Version: 3.0.x
Resolution: wontfix | Keywords:
--------------------------+---------------------------
Changes (by Algunenano):
* status: new => closed
* resolution: => wontfix
Comment:
I think that the planning difference comes from calling
ST_Buffer(geography). This requires calling ST_Transform multiple times
and from PROJ6+ the initialization to do the transformation is much slower
than before.
For example:
{{{
explain analyze Select * from populated_places_10_200 where the_geom &&
st_buffer(geography(st_makepoint(48.9, 17.1)), 1000);
Rows Removed by Filter: 10
Planning Time: 18.755 ms
Execution Time: 0.047 ms
}}}
But if we precalculate the buffer call it doesn't need to be calculated
during the planning process:
{{{
explain analyze Select * from populated_places_10_200 where the_geom &&
'0103000020E610000001000000210000002BB56A00677448405C3505F89F19314030735BBB617448406A20C2592C193140EC5A10D6507448401DCD6BEEBC18314004EFD4F63474484098061EFE551831407F8DEB2F0F74484007137F7DFB173140FC1901F5E07348404E74D7E6B0173140ED65E30CAC734840EA3BDE1779173140C70F078072734840B5FB8935561731401CC18884367348400A1DFB964917314032496E68FA72484083974EB8531731406822FD7AC07248402E4DDA357417314065DB04F68A72484086B501D0A9173140624DFCE75B72484073207D77F2173140BF7BC81F3572484010EF9A614B1831408BBBF31A18724840B7D0B323B118314058EF03F705724840BD5CC4D41F19314023208066FF714840D8F6E13393193140E4AB11AA047248401D1E11D2061A31403A01058E1572484078ECE13D761A314029F3426C317248403DF1252FDD1A314091BAAF3257724840446911B1371B3140076CB16D8572484039332949821B314044AC7656BA724840BA307E19BA1B3140E55A71E4F37248400FDEE4FCDC1B3140633659E12F734840740A139CE91B31408864F1FE6B734840A77DD37ADF1B31403F4EBAEDA5734840F04CCDFCBE1B31403D0FB073DB73484057A6AF61891B31405B3735820A744840F2B6E7B8401B31400ACB514A3174484018BD59CDE71A31400DFF7E4E4E7448405616E509821A3140C872507160744840301DC257131A31402BB56A00677448405C3505F89F193140'::geography;
Rows Removed by Filter: 10
Planning Time: 0.138 ms
Execution Time: 0.076 ms
}}}
AFAIK, nothing can be done on our side to speed up PROJ.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4732#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list