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.<div><br></div><div>Bug report filed with QGIS: <a href="http://trac.osgeo.org/qgis/ticket/3453">http://trac.osgeo.org/qgis/ticket/3453</a></div>

<div><br></div><div>It seems there is no way to find a geometry type of a view without inspecting the data?</div><div><div><br></div><div>Aren<br><br><div class="gmail_quote">2011/1/30 Nicklas Avén <span dir="ltr"><<a href="mailto:nicklas.aven@jordogskog.no">nicklas.aven@jordogskog.no</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

    
    
    
<div>
<p>Hallo
<br>
<br>I have no answer to your question but I know that QGIS doesn't require a representation in geometry columns table. 
<br><font color="#888888">
<br>/nicklas
<br></font></p><div><div></div><div class="h5">
<br>----- Original message -----
<br>> I noticed this really inefficient query when QGIS was importing a Postgis
<br>> layer:
<br>> *select distinct case when geometrytype("the_geom") IN
<br>> ('POINT','MULTIPOINT') THEN 'POINT' when geometrytype("the_geom") IN
<br>> ('LINESTRING','MULTILINESTRING') THEN 'LINESTRING' when
<br>> geometrytype("the_geom") IN ('POLYGON','MULTIPOLYGON') THEN 'POLYGON' end
<br>> from [databaseGoesHere]*
<br>> 
<br>> That surprised me because QGIS should already know the *geometrytype
<br>> *through the *geomerty_columns* table.
<br>> 
<br>> Is this really QGIS's fault, or did Postgis cause/require this? Want to
<br>> make sure before I file a bug report.
<br>> 
<br>> Thanks,
<br>> 
<br>> Aren
<br><br></div></div><p></p>
</div>

<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div></div>