4

We have a QGIS project using PostgreSQL database "made with" osm2pgsql. The database is about 68GB.

Our Configuration is : AMD-FX 8 cores @ 4.7Ghz 32 Gb RAM 500 Gb SSD (read/write 600Mb/s) Ubuntu 14.04 LTS QGIS 2.8.2

When we open the project, it takes about 10 minutes. After that we can navigate, zoom in/out, show hide layers, all without a problem.

Is there a way to improve the time for opening the project?

0

1 Answer 1

4

@AndreJ showed us the way.

First you have to know that when adding a Layer from your database, the database parameters are burnt into the QGIS project file. This mean if you modify those parameters from QGIS source, it will not affect you project file.

If you need to modify those parameters there is only 2 solutions :

1/ Remove the layer and re-import it with correct parameters.

2/ Editing your QGIS project file with a Text Editor (our case because was many styles and scripts in the layers) and find those lines :

<datasource>dbname='MyDatabase' host=localhost port=5432 user='MyLog' password='MyPass'... </datasource>

and add estimatedmetadata=true in order to activate estimated table metadata option :

<datasource>dbname='MyDatabase' host=localhost port=5432 user='MyLog' password='MyPass' ... estimatedmetadata=true ... </datasource>

We can now open our project in few seconds instead of 10 minutes.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.