[postgis-users] Inefficient query with QGIS?

Aren Cambre aren at arencambre.com
Sun Jan 30 10:19:05 PST 2011


Thanks. Further investigation suggests a QGIS bug. It's trying to determine
geometry type on views. This is a problem for me since one of my views has
almost 12,000,000 rows.

Bug report filed with QGIS: http://trac.osgeo.org/qgis/ticket/3453

It seems there is no way to find a geometry type of a view without
inspecting the data?

Aren

2011/1/30 Nicklas Avén <nicklas.aven at jordogskog.no>

>  Hallo
>
> I have no answer to your question but I know that QGIS doesn't require a
> representation in geometry columns table.
>
> /nicklas
>
> ----- Original message -----
> > 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
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110130/dfd5cb39/attachment.html>


More information about the postgis-users mailing list