[Qgis-user] Import (not so) large data into a remote postgis database
Olivier Dalang
olivier.dalang at gmail.com
Thu Jan 15 12:32:49 PST 2015
Dear list,
I'm trying to figure out the best way to upload data on a remote postgis
database from within QGIS.
I know the recommended ways to load data is to use some external tools or
queries (shp2pgsql, ogr2ogr, pgdump, etc.), but I need this operation to be
doable by people who are not tech savvy enough for such solutions.
The data I'm working on is not small, but not huge either (around 6000
records, some with around 20 columns and relatively simple polygons, other
with as low as 3 text columns), but I encounter a lot of problems with all
of them. The postgis server is distant and there is some lag, but it's
reasonable enough to display data, so I thought it would be OK to upload
some data too.
>From within QGIS, it seems there are 3 ways to do this :
A. from the DB manager, using the "import data" button
B. from the browser, by dragging&dropping from one source to another
C. from the SPIT plugin
But each of them has it's caveats.
A. DB Manager
- The process is extremely slow (around 4 minutes for 200 rows even on
extremly simple tables), and I get no feedback about the progress
- For small files, it ends up by working. For larger files, the window is
"not responding" and users will force quit QGIS (who'd wait two hours when
importing 6000 rows ?)
- Besides this, it works nicely : I'm able to choose in which schema I
upload the table, it takes in any layer that I'm able to open in QGIS, it
keeps the SRID and the geometry, etc.
B. Browser
- The process is as slow as with the DB manager.
- Everything is uploaded to the public schema, even if I carefully drop it
on another schema (which is a problem since I need some privilege control
and to make use of the default privileges)
- It doesn't work for "packaged" layers, such as spatialite or .mdb files,
since I can't choose which layer I want to upload
C. The SPIT plugin
- The process is extremely slow (but at least I see a progress bar)
- It works only on shapefiles, so it's not really practical since some of
the data is not geometric and comes from MS access.
- It doesn't take the shapefile's CRS into account
- I read somewhere that it will be discontinued with next versions of QGIS
Am I missing something ? Or doing something wrong ?
Do you know another way to import data from within QGIS that's not affected
by this extreme slowness problem ?
Thanks !
Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150115/3b607239/attachment.html>
More information about the Qgis-user
mailing list