[postgis-tickets] [PostGIS] #3092: Slow performance of geometry_columns in PostGIS >= 2

PostGIS trac at osgeo.org
Fri Apr 24 13:45:06 PDT 2015


#3092: Slow performance of geometry_columns in PostGIS >= 2
--------------------------+---------------------------
  Reporter:  rouault      |      Owner:  pramsey
      Type:  enhancement  |     Status:  new
  Priority:  high         |  Milestone:  PostGIS 2.1.8
 Component:  postgis      |    Version:  2.0.x
Resolution:               |   Keywords:
--------------------------+---------------------------

Comment (by robe):

 Hmm I had a different thought that doesn't use arrays at all, but I'll
 compare yours with what I was going to try.

 I had created this script to test out the speed.
 The 10 I tried to bump the 10 to  1000 but ground to a halt creating those
 tables on the machine I was testing on.  Might have been cause I was
 testing on an old 9.3 beta.


 {{{
 DROP SCHEMA IF EXISTS test CASCADE;
 CREATE SCHEMA test;

 DO language plpgsql
 $$
 DECLARE var_sql text;
 BEGIN
   SELECT string_agg('CREATE TABLE test.constraint_test_' || lower(f.geom)
 || '_' || i::text || '(gid serial);
   SELECT addgeometrycolumn(''test'', '
   || quote_literal('constraint_test_' || lower(f.geom) || '_' || i::text)
 || ' , ''geom'',
         ' || f.srid::text || ',' || quote_literal(f.geom) || ', 2,
 false);', '') INTO var_sql
   FROM (VALUES ('POINT'::text, 4326), ('MULTIPOLYGON'::text, 4269),
 ('LINESTRING'::text, 4326)) f(geom,srid)
                 , generate_series(1,10) As i;
   EXECUTE var_sql;
 END;
 $$
 }}}

--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3092#comment:8>
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