Bug report #5252

MSSQL Estimated table parameter is not used

Added by Jeremy Palmer over 9 years ago. Updated about 8 years ago.

Assignee:Tamas Szekeres
Category:Data Provider
Affected QGIS version:master Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:14986


When loading the "Add MS Tables(s)" Dialog and connecting to a MSSQL database, determining the geometry type is very slow for large table, even if the "Use estimated table parameters" option is set for the connection.

Looking at https://github.com/qgis/Quantum-GIS/blob/d212ca7f7174a2063f245e31e27f2848387c1df0/src/providers/mssql/qgsmssqlsourceselect.cpp#L740 is seems like it should be working. Maybe the parameter is not being passed down correctly?

Associated revisions

Revision 51011559
Added by Tamas Szekeres over 9 years ago

Improve handling of estimated metadata (fixes #5227 fixes #5252)


#1 Updated by Tamas Szekeres over 9 years ago

Fixed in :szekerest/Quantum-GIS.git

#2 Updated by Tamas Szekeres over 9 years ago

  • Status changed from Open to Closed

#3 Updated by Jeremy Palmer over 9 years ago

  • Assignee changed from Tamas Szekeres to Jürgen Fischer

Thanks. Can this stuff be backported to 1.8?

#4 Updated by Jeremy Palmer over 9 years ago

  • Status changed from Closed to Reopened
  • Assignee changed from Jürgen Fischer to Tamas Szekeres

Hi Tamas,

I just re-tested this and it still seems that the estimated metadata parameter is not being used correctly. If the un-tick the "Only look in the geometry_columns metadata table" option large layers take a long time to update in the grid. Also when I add the layer to the canvas it takes a long time too (as it again tries to determine the table geometry type). Once the layer is added to the canvas, if I view the datasource URI in the metadata tab with the layer properties it doesn't have the estimated metadata parameter listed.

I'm using revision e54e87f trunk on winxp


#5 Updated by Paolo Cavallini over 9 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#6 Updated by Tamas Szekeres about 8 years ago

  • Status changed from Reopened to Closed

Also available in: Atom PDF