[postgis-users] Inefficient query with QGIS?

Aren Cambre aren at arencambre.com
Sun Jan 30 07:59:18 PST 2011


I noticed this really inefficient query when QGIS was importing a Postgis
layer:
*select distinct case when geometrytype("the_geom") IN
('POINT','MULTIPOINT') THEN 'POINT' when geometrytype("the_geom") IN
('LINESTRING','MULTILINESTRING') THEN 'LINESTRING' when
geometrytype("the_geom") IN ('POLYGON','MULTIPOLYGON') THEN 'POLYGON' end
from [databaseGoesHere]*

That surprised me because QGIS should already know the *geometrytype *through
the *geomerty_columns* table.

Is this really QGIS's fault, or did Postgis cause/require this? Want to make
sure before I file a bug report.

Thanks,

Aren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110130/9f8a33aa/attachment.html>


More information about the postgis-users mailing list