QGIS 3.18 PostgreSQL 14.
We use QGIS to access data from a PostGIS server. The data are stored in 33 schemas.
- one contains all the data in 17 tables;
- the others schemas contain views and materialized views created from the first schema as needed
- There are 485 objects (ordinary tables, views and materialized views)
autovacuum
andtrack_counts
are on by default.
The "problem" is that it takes at least around 4 minutes to list all the schemas in the PostgreSQL connection window of QGIS when we want to connect to the database.
The same behaviour can be seen when using the export to PostgreSQL (available connections) plugin : after we choose the database, the list of the schemas takes a very long time to appear.
I tried to rise shared_buffers
parameter from 128 to 256MB. I did not see any effect.
Is there a way in PostgreSQL to reduce this time ?
EDIT:
As requested, here is a link to the query plan : https://explain.dalibo.com/plan/83d5f515345c5aa8#plan/node/354
select * from pg_namespace
".