<div dir="ltr"><div><div><div>Cool !<br></div>That's probably why it is the fastest way to load shp (faster than gdal). <br></div>B-)<br><br></div>For big data I would bet that it is fastest to load with copy then reproject with transform in base.<br>
<br>Cheers,<br>Rémi-C<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-18 12:56 GMT+02:00 Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Fri, Jul 18, 2014 at 10:36:47AM +0100, Mark Cave-Ayland wrote:<br>
> On 18/07/14 10:17, Sandro Santilli wrote:<br>
><br>
> >It looks like shp2pgsql doesn't do INSERT in multiple<br>
> >transactions anymore, but I couldn't figure out since when.<br>
> ><br>
> >It used to do 250 inserts per transaction around 2004, do<br>
> >you know when was that changed and why ?<br>
><br>
> Not sure - check the history? However I would definitely have argued<br>
> to remove this, given as I have personal experience that the time<br>
> cost of manually sorting through a partial committed shapefile is<br>
> exponentially larger than failing individual queued shapefiles so<br>
> you easily know which files you need to retry.<br>
<br>
</div>I agree a single transaction is easier to deal with, but anywa<br>
given this is a change in behavior I would have expected an entry<br>
in the NEWS file.<br>
<br>
Maybe it changed during the refactoring toward -core and -cli.<br>
I guess a comparable speed to the "chunked insert" could be obtained<br>
by using a single INSERT for multiple rows, like:<br>
<br>
INSERT INTO target VALUES<br>
(row1),<br>
(rowX),<br>
(row255)<br>
;<br>
<br>
Remi: shp2pgsql can do boty COPY or INSERT. You can't use COPY when<br>
reprojecting, which is a reason to use INSERT.<br>
<br>
--strk;<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br>
</div></div></blockquote></div><br></div>