I'm using a cloud service for hosting my PostgreSQL/PostGIS database.
When connecting with QGIS, its extremely slow.
The observed behavior is:
Connecting to PostGIS DB: works great.
Adding a layer to the map view: A bit slow but noting to worry
Open attribute table: really really slow, up to 45 seconds to open a small table of 100 point (QGIS become freeze and won't respond until the table open)
When Editing a layer in the PostGIS
- Adding a new feature or editing the values of the attribute table: 45 seconds to get the form for insert the attributes and when saving the edit another 45sec. (sometimes can get worse if the geometry added its complex with alot of nodes its can take up to 3 min)
So I'm investigate a little and make some test, maybe the latency between my client QGIS (my PC) and the PostGis (cloud db) its the problem:
I'm using the Azure Database for PostgreSQL and the server is in US East region, so I did the network test between client - host to see is the latency is the problem:
Using psql:
\timing
SELECT;
\watch 1
I get the following values:
83 - 84ms so it's not that bad, noting to get 45 sec in QGIS and the results are consistent with the ping from my location to the Azure server.
The DB performance looks ok since it's a really small db and queries with pgadmin o psql are fast.
Someone with experience using cloud db for using with QGIS maybe can guide me or give me an insight, maybe I'm missing a QGIS configuration or host server networking config.