On Mon, Mar 23, 2015 at 04:25:30PM +0100, Even Rouault wrote: > Le mercredi 18 mars 2015 18:59:28, Paul Ramsey a écrit : > > With 1000 tables, the disparity is 300ms for the join on geometry_columns > > and 30ms for the straight system table query. > > On my system, just "select * from geometry_columns" with 1000 tables takes ~ > 800 ms. Digging more into the definition of the view, what is super costly in > fact is the evaluation of postgis_constraint_dims(), > postgis_constraint_srid() > and postgis_constraint_type(), because each causes a SELECT to be executed > for > each row if some typmod constraints are missing. I guess this could have, at > worst, quadratic performance performance in case no/little index are > available. > > The following request gives similar information but in ~ 80 ms:
Now we're talking ! :) Thanks for looking at it, Even. Sounds worth a ticket on PostGIS to optimize that query. --strk; _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev