Bug report #5811

dbmanager freezes when the schema has a lot of tables

Added by Giovanni Manghi almost 12 years ago. Updated almost 9 years ago.

Status:Closed
Priority:High
Assignee:-
Category:DB Manager
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:Yes Copied to github as #:15294

Description

I noticed that DB Manager freezes (or at least take a very long time) when opening a schema that has a lot of tables in it.

With hundreds of tables it takes a lot, with thousand it can freeze completely the program.

On the other hand the "add postgis" dialog list the tables in schemas very quickly, even when there are thousands of them.

History

#1 Updated by Jürgen Fischer almost 12 years ago

  • Subject changed from QGIS freezes when the schema has a lot of tables to dbmanager freezes when the schema has a lot of tables

#2 Updated by Paolo Cavallini over 11 years ago

  • Target version set to Version 2.0.0

#3 Updated by Giovanni Manghi over 11 years ago

It is now even worst is using Postgis 2.0

#4 Updated by Paolo Cavallini over 11 years ago

  • Assignee changed from Giuseppe Sucameli to anonymous -

#5 Updated by Jürgen Fischer almost 11 years ago

  • Assignee deleted (anonymous -)

#6 Updated by Daniel Vaz almost 11 years ago

This affect only postgis?

#7 Updated by Giovanni Manghi almost 11 years ago

Daniel Vaz wrote:

This affect only postgis?

When I have to put thousands of layers into a DB I use PostGIS, so I just have this case (I have not tested with Spatialite).

#8 Updated by Salvatore Larosa over 10 years ago

with 200 tables I don't see this issue, do you think we can close the issue or at least decrease the priority?

#9 Updated by Giovanni Manghi over 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - High Priority
  • Priority changed from High to Normal

Salvatore Larosa wrote:

with 200 tables I don't see this issue, do you think we can close the issue or at least decrease the priority?

in my case is still an issue (freeze). It pretty slow also with hundreds of tables when the db is remote (much slower than the "add postgis layer" dialog).

#10 Updated by Giovanni Manghi about 10 years ago

  • Priority changed from Normal to High

#11 Updated by Martin Dobias about 10 years ago

Giovanni, is there such problem with slowness also with PostGIS manager plugin?

I believe the main issue is with the fact that the DB manager tries to immediately find out type of the geometry columns, while "Add PostGIS layer" dialog in QGIS only does a basic query and then fetches the additional information in background. The DB manager should use the same approach. When doing that it should ideally reuse the code from PostGIS provider. Either way, that will require various non-trivial changes and will be a new feature rather than just a bug fix.

#12 Updated by Giovanni Manghi about 10 years ago

Martin Dobias wrote:

Giovanni, is there such problem with slowness also with PostGIS manager plugin?

do you refer to your old plugin or the "add postgis layer" dialog?

If it is the latter then the answer is "no", does not freeze. It is actually fast to connect to a server with schemas with thousands of tables in it and list them.

#13 Updated by Martin Dobias about 10 years ago

I meant my old plugin :)

#14 Updated by Giovanni Manghi about 10 years ago

Martin Dobias wrote:

I meant my old plugin :)

it seems equally slow (many seconds) with a couple hundred of tables. More or less as DB Manager. With more tables both basically freeze qgis.

#15 Updated by Giovanni Manghi almost 10 years ago

still an issue in latest master while the QGIS browser does not suffer of the same problem.

#16 Updated by Giovanni Manghi over 9 years ago

still true on latest master.

#17 Updated by Giovanni Manghi almost 9 years ago

  • Resolution set to not reproducable
  • Status changed from Open to Closed

now in master it seems that speed is much more reasonable, even on slow connections on a remote server.

Also available in: Atom PDF