[gdal-dev] Pg Table Listing

Sandro Santilli strk at keybit.net
Mon Mar 23 09:16:17 PDT 2015


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; 


More information about the gdal-dev mailing list