[Qgis-user] Adding PostGIS Layer (Query Before Load)

Jorge Gustavo Rocha jgr at geomaster.pt
Mon Aug 5 17:06:11 PDT 2019


Hi Peter,

1) Normally, after clicking "Connect" you will get all layers. You can
select one of them and use "Set filter" to define a filter before adding
it to the map. Sorry for asking, but you are aware of the "Set filter"
button, right?

2) In your case, it hangs before that. It hangs before listing all
tables. When you click connect, QGIS will fetch some metadata to fill
the list of available tables with the correspondent geometry type. One
of such metadata queries is failing against your tables.

Can you enable logging of all Postgresql statements and identify the
query that is hanging QGIS? It would help to identify the problem.

Regards,

Jorge Gustavo

Às 23:29 de 05/08/19, Peter Borissow escreveu:
> Hello,
>      I have a partitioned table in a PostgreSQL/PostGIS database with
> ~30 billion points. I would like to render a subset of this data in
> QGIS and run some analytics.
>
> Normally, with a smaller dataset, I would simply navigate to the table
> I want via the "Browser" and add it to the map via a double click.
> Once the data is loaded, I can filter the data, run analysis, etc.
> However, in my case, this is impossible. What I need is an option to
> filter the data before loading it into the map.
>
> I looked at the Data Source Manager (Layer -> Add Layer -> Add PostGIS
> Layers...) but I don't see any filtering options there and the app
> hangs when I hit the "Connect" button.
>
> Obviously, I can create views in the database to circumvent this issue
> but I don't want to create dozens of custom views.
>
> Is there another way to create a layer from PostgreSQL/PostGIS using a
> filter-first strategy in QGIS?
>
> Thanks in advance,
> Peter
>
>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-- 
Logo*   Geomaster, LDA*
  *VENHA DESCOBRIR O CAMINHO DO OPEN SOURCE CONNOSC**O

*
 
Avenida Barros e Soares
N.º 423, 4715-214 Braga
VAT/NIF510 906 109
Phone  +351 253 680 323
Site       geomaster.pt <http://geomaster.pt>
GPS       41.53322, -8.41929
	
------------------------------------------------------------------------
	 
Jorge Gustavo Rocha
CTO

Mobile  +351 910 333 888
Email    jgr at geomaster.pt


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190806/af132ba1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cropped-geomaster300x300-1.png
Type: image/png
Size: 33896 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190806/af132ba1/attachment-0001.png>


More information about the Qgis-user mailing list