[Qgis-developer] Problem with the MySQL/GDAL implementation in QGIS
Pavol Hnila
pavol.hnila at fu-berlin.de
Thu May 7 05:55:47 PDT 2015
Hi,
I have a suspicion that the MySQL driver in QGIS is not working properly
when the MySQL database contains more than one table. I made tests with
pure command-line GDAL and this problem does not occur there. GDAL
queries all the tables, but only once, at the opening of the dataset.
QGIS however opens and quits the entire dataset for each row in a table
that is accessed. If there are 34 rows in a table and it is a single
table in the database, there will be 34 queries. If there are 80 tables
in the same MySQL database and I want to show those 34 rows of one
table/layer, then there will be suddenly 34x80 queries. Since this
happens each time a layer is zoomed in or zoomed out, edited, or an
attribute table needs to be opened, there are serious flaws in the
performance as a consequence - up to the point that QGIS becomes not
operational.
I described the problem in depth here:
http://gis.stackexchange.com/questions/135865/why-are-mysql-connections-extremely-slow-in-qgis-2-0-2-8-when-compared-to-qgi
The logs can be found here:
https://drive.google.com/folderview?id=0B1VM28puP8EPfmF2dGpjamVDWVZ6Vm1veHgtOElhY2lHb0ZTSlI1WXNuWWFvU3pRQmVLMTA&usp=sharing
I had a fruitful exchange on the gdal-dev mailinglist about this:
http://osgeo-org.1560.x6.nabble.com/gdal-dev-Problems-with-MySQL-queries-in-GDAL-td5204406.html
My current conclusions are:
1) the problem is likely in the implementation of MySQL/GDAL driver
since QGIS 2.0
2) The last version that worked fine was QGIS 1.8.
3) The connection string to mysql in GDAL can be limited to any
particular table. If this is implemented in QGIS, it would be a great
improvement for the performance.
I have big expectations from this list to finally understand why the
described problem occurs and how it can be resolved,
Best regards,
Pavol
More information about the Qgis-developer
mailing list