[postgis-devel] find_srid get rid of schema.table checking

Paragon Corporation lr at pcorp.us
Mon Apr 27 19:19:48 PDT 2015


Now that I switched over geometry_columns in 2.2, I was still surprised that
the find_srid performance is still not improved.

http://trac.osgeo.org/postgis/ticket/3103

On closer inspection it has a  lot of overhead.  First the error checking
for if srid not found (and even checking if values are NULL when they can't
be because the function is marked STRICT anyway).

The worse offender seems to be the logic that splits out the schema name and
table name if someone happens to do something like


SELECT find_srid('', 'myschema.mytable', 'geom');


I'm not sure why the performance sucks so badly on my 9.3.6 instance, but on
my 30,000 set of geom column tests, the new version I wanted to put in
finishes in under 2 seconds, the old goes on for minutes to the point I lost
patience and canceled.

I'd really like to simplify that logic, to what I have here, but not sure if
any third-party tools rely on this schema.table love hugging acceptance.
Unfortunately folding that logic even switching to split_part didn't seem to
help the situation.


Have issue described here:

http://trac.osgeo.org/postgis/ticket/3103

Thanks,
Regina








More information about the postgis-devel mailing list