Bo Victor Thomsen
2018-12-06 09:05:00 UTC
Hi list -
I've done some experiments with a dataset consisting of 440000 rows and
uploaded this to two database servers: Postgres and SQLServer. Both tables
has indexes on Primary key and the spatial column.
And then connected to both tables in QGIS. The SQL server is *3 times*
slower in retrieving the dataset than Postgres in QGIS!
And it's not SQL server's fault!! I've made the same experiment using
GeoServer as a client where Postgres is only slightly faster.
To make matters worse... In QGIS you can connect to the SQL server database
using the "Layer" > "Add Layer" > "Add Vector layer" - i.e. using the OGR
driver - to connect to the SQL Server table. This makes the retrieval of
SQL Server data nearly as fast as Postgres.
I have to conclude, that the native QGIS SQLServer driver is really, really
bad. What's the matter with this driver?
I recollect, doing the same experiment in QGIS 2.x, that a simple fetch of
SQL server data was nearly as fast as retrieving data from a comparable
Postgres database server (Iâm not talking about complex spatial queries,
where Postgres blows SQL Server totally out of the water, but simple
retrieval of layer data using a MBR search)
Unfortunately, I can't just switch to the OGR driver since I have some
write issues with this driver.
What gives ???
I've done some experiments with a dataset consisting of 440000 rows and
uploaded this to two database servers: Postgres and SQLServer. Both tables
has indexes on Primary key and the spatial column.
And then connected to both tables in QGIS. The SQL server is *3 times*
slower in retrieving the dataset than Postgres in QGIS!
And it's not SQL server's fault!! I've made the same experiment using
GeoServer as a client where Postgres is only slightly faster.
To make matters worse... In QGIS you can connect to the SQL server database
using the "Layer" > "Add Layer" > "Add Vector layer" - i.e. using the OGR
driver - to connect to the SQL Server table. This makes the retrieval of
SQL Server data nearly as fast as Postgres.
I have to conclude, that the native QGIS SQLServer driver is really, really
bad. What's the matter with this driver?
I recollect, doing the same experiment in QGIS 2.x, that a simple fetch of
SQL server data was nearly as fast as retrieving data from a comparable
Postgres database server (Iâm not talking about complex spatial queries,
where Postgres blows SQL Server totally out of the water, but simple
retrieval of layer data using a MBR search)
Unfortunately, I can't just switch to the OGR driver since I have some
write issues with this driver.
What gives ???
--
Med venlig hilsen
Bo Victor Thomsen
Med venlig hilsen
Bo Victor Thomsen