[postgis-devel] GUI Speed

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Sat Jul 10 07:07:38 PDT 2010

Paul Ramsey wrote:
> I found one massive speed problem in the GUI (updating the progress bar way too often) and removed it, but the GUI is still a good ten times slower than shp2gpsql | psql at loading files. My current profile seems to show we are spending piles of time in transaction processing? (all the time is in the postgres process, the gui process itself isn't the bottleneck anymore) Perhaps there's something wrong with the way we're using libpq for this? A profile taken against a shp2pgsql load just shows that tuple compression in the lz routines is taking the time, which seems acceptable.

I can think of a couple of things on the top of my head:

i) By default, shp2pgsql .... | psql -d foo  will use local UNIX sockets 
rather than TCP/IP. Does it make a difference if you do something like 
shp2pgsql .... | psql -d foo -h localhost to force TCP/IP transport?

ii) Does the GUI use COPY or INSERT format by default? Way back in my 
mind I had a feeling that shp2pgsql defaulted to COPY whereas the GUI 
defaulted to INSERT.



Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs

More information about the postgis-devel mailing list