[postgis-tickets] [PostGIS] #4450: Speed up ST_GeometryType by avoiding strncat calls
PostGIS
trac at osgeo.org
Fri Jul 5 08:58:41 PDT 2019
#4450: Speed up ST_GeometryType by avoiding strncat calls
-------------------------+---------------------------
Reporter: Algunenano | Owner: Algunenano
Type: enhancement | Status: assigned
Priority: medium | Milestone: PostGIS 3.0.0
Component: postgis | Version: trunk
Keywords: |
-------------------------+---------------------------
`ST_GeometryType` is currently doing 2 strncat calls which aren't
necessary since the output is always the same and can be stored
statically.
Performance difference:
{{{
Select ST_GeometryType(the_geom_webmercator) from
benchmark_7773a711c8441d4b494a51fd9feebeac7a9b9c734619398620293;
}}}
Before:
{{{
number of transactions actually processed: 407
latency average = 296.925 ms
tps = 13.471411 (including connections establishing)
tps = 13.474553 (excluding connections establishing)
}}}
Using a static char**:
{{{
number of transactions actually processed: 437
latency average = 275.895 ms
tps = 14.498272 (including connections establishing)
tps = 14.501781 (excluding connections establishing)
}}}
10% ain't much, but it's honest work
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4450>
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