[Qgis-user] Project takes very long to load

Andreas Neumann a.neumann at carto.net
Tue Apr 28 03:25:57 PDT 2009


Hi Nikos,

Did you re-save the project in another name or saved it again?

In any case, I would open the project file in a text/XML editor and make
sure that the key='gid' (or similar column name) is present in the
datasource element.

Here is an example:

<datasource>dbname='world' host=localhost port=5432 user='an'
sslmode=disable key='gid' table="countries"."country_border" (the_geom)
sql=</datasource>

Maybe you need to manually introduce the key='somekey' in a text/XML editor.

Can you test again and report if this helped?

Thanks,
Andreas


On Tue, April 28, 2009 12:08 pm, Nikos Alexandris wrote:
>
> Andreas:
>> I'd like to inform you that Jürgen provided a fix for the problem,
>> which
>> is now in trunk. Thank you Jürgen!
>>
>> The problem really was the primary key detection, which was checked with
>> every project load and took very long for complex views/tables. Now the
>> pkey check is done with the initial layer loading and stored in the
>> project file. When loading the layer it seems like it first starts the
>> primary key detection with the stored key attribute from the project
>> files
>> and stops searching for further keys after it confirmed that the
>> suggested
>> key works - at least this is how I understand the current behavior in
>> trunk - Jürgen - please correct me if I am wrong.
>>
>> Anyway - the project that previously loaded in 3-4 minutes now loads in
>> approx. 10 seconds.
>
> Hi Andreas,
>
> I just recompiled qgis_unstable. Unfortunately for me it doesn't improve
> load time of old(er) projects.
> [...]
>
> Nikos
> ---
>
> Ubuntu Jaunty 64-bit
>
>


-- 
Andreas Neumann
http://www.carto.net/neumann/
http://www.svgopen.org/




More information about the Qgis-user mailing list