[gdal-dev] Slow convertion from OSM to PG with -skipfailures
Even Rouault
even.rouault at mines-paris.org
Mon May 27 12:06:38 PDT 2013
Le lundi 27 mai 2013 20:52:57, Stephen Woodbridge a écrit :
> Even,
>
> Would it make sense to create and load a stored procedure that you use
> to load the feature with, then you can trap exceptions and ignore them.
> I would think that this would be much faster. Well the stored procedure
> is run in a transaction bout you could do something like:
>
> begin;
> select loadfeatureskipfailures(<args>) from features where gid between
> gid_from and gid_to;
> commit;
>
> And run this in a loop incrementing gid_from and gid_to over your range
> of features.
>
> I would think that something along these lines would be faster than
> doing every insert in a separate transaction.
I'm afraid I'm not familiar enough with PG stored procedures to really assess
the feasability of your suggestion. What is the features table in your example
? How is it populated ? And I'm a bit skeptical that this could catch and
recover errors in a better way than doing it from the outside.
--
Geospatial professional services
http://even.rouault.free.fr/services.html
More information about the gdal-dev
mailing list