Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.3.0
Description
The performance of ST_Transform drastically degraded since 1.3.0. This is the flamegraph of an executor node when running queries like this:
SELECT COUNT(1) FROM ms_buildings WHERE ST_Transform(ST_FlipCoordinates(geom), 'epsg:4326', 'epsg:3857') is not NULL
The performance regression is caused by the introduction of custom CRS support. As we can see, most of the time was spent by exception handlers in geotools-referencing module. It is a very common use case to specify a well known CRS when calling ST_Transform, and we don't want to suffer from such a performance hit when doing that. One approach to fix this problem is to detect if the CRS string "looks like" a well known CRS by pattern matching before calling the expensive CRS.parseWKT.
Attachments
Attachments
Issue Links
- links to