On Tue, May 20, 2014 at 12:27:31PM +0200, Sergio Gollino wrote: > Hi Florian, > if you just need a primary key on your view you can add this on your view: > > CREATE OR REPLACE VIEW v_kvztallength_pos AS > SELECT > row_number() OVER (ORDER BY tablename.id) AS gid, > ecc... > ecc.. . > FROM tablename
I'll try that - my first guess is thats it not faster ;) > This create a column with a unique value (gid) that Qgis will recognize. > you can choose the unique key in the table tree when you add your view in > qgis. see -->http://i.stack.imgur.com/Da0xP.png > > but I'm not sure that your problem is here, how many rows have your view? About 20 Million IIRC - And i have told qgis what the unique key is. My datasource has: [...] key='id' srid=4326 type=POINT table="public"."v_kvztallength_pos" (position) sql= > If I have understand it right, you want to edit your view, but you can't > (in an easy way) edit a view even if you have a primary key. Its better for > you to create a table and use spatial indices. I dont need to edit the view i just want to display it. Its basically a join over an address (with geocoded position) with metadata in a different table. The metadata references the address with a foreign key. Flo -- Florian Lohoff [email protected]
signature.asc
Description: Digital signature
_______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
