[PostGIS] #5667: Performance Postgis Topolgy when adding millions by using TopoGeo_AddLineString

PostGIS trac at osgeo.org
Wed Feb 14 03:35:23 PST 2024


#5667: Performance Postgis Topolgy when adding millions by using
TopoGeo_AddLineString
--------------------------------+-------------------
  Reporter:  Lars Aksel Opsahl  |      Owner:  strk
      Type:  enhancement        |     Status:  new
  Priority:  medium             |  Milestone:
 Component:  topology           |    Version:  3.4.x
Resolution:                     |   Keywords:
--------------------------------+-------------------
Comment (by strk):

 20 queries of topology.topology every single TopoGeo_addLineString is
 unexpected, I cannot reproduce it with POSTGIS="3.5.0dev
 3.4.0rc1-926-g799a63a81"


 Also the query in your first report started with:
 > SELECT id,srid,precision,null::geometry
 while the second started with:
 > SELECT id,srid,precision,$2::geometry

 The first one I recognize as coming from the `cb_loadTopologyByName` C
 function which is the one I see called once per `TopoGeo_addLineString`
 call. In the first report we had 1.12 calls of that one for every call of
 `TopoGeo_addLineString`.

 The second one I cannot find in the source tree of current PostGIS master
 branch (`git grep 'id,srid,precision'`) so chances are it is coming from
 client code and would still be there if PostGIS implemented an internal
 cache to bring down those PostGIS queries down to 1 per statement.

 What is the full version of postgis you are using ?
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5667#comment:6>
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