[gdal-dev] ogrinfo UPDATE performance request

Andreas Oxenstierna andreas.oxenstierna at t-kartor.com
Thu Jun 9 00:16:54 PDT 2022


Of course I normally do this directly in the database with pgAdmin or psql.

In this process scenario it is preferable if the complete process (this is the final step of approx. 10 gdal/ogr processes) can be executed in batch by a client with no psql access.
We have to use psql if there is no acceptable solution with ogr

Hälsningar

Andreas Oxenstierna
T-Kartor Geospatial AB
Olof Mohlins väg 12 Kristianstad
mobile: +46 733 206831
mailto: andreas.oxenstierna at t-kartor.com<mailto:andreas.oxenstierna at t-kartor.com>
www.t-kartor.com<http://www.t-kartor.com>
On 9 Jun 2022, 08:59 +0200, Alexandre Gacon <alexandre.gacon at gmail.com>, wrote:
Hi,

If you work with a Postgres database, why don't you do this directly in the database? It seems odd to use ogrinfo to do such updates in database.

Regards
Alexandre

Le jeu. 9 juin 2022 à 08:50, Andreas Oxenstierna <andreas.oxenstierna at t-kartor.com<mailto:andreas.oxenstierna at t-kartor.com>> a écrit :
Dear developers

Ogr SQL update capabilities are really impressing but there is one major performance issue with update of many features, exemplified by:
ogrinfo -dialect sqlite -sql "UPDATE <table> SET x = 1" PG:”<connection>"

This is painfully slow because ogr updates features one by one and furthermore updates all existing attributes incl. geometries.
Eg. updating 10000 features in pgAdmin/psql with UPDATE <table> SET x = 1 executes in milliseconds but takes several minutes with ogr.

The current ogr functionality is also not correct from a database transactional point of view.

I found an old RFC, https://gdal.org/development/rfc/rfc13_createfeatures.html, requesting this but it was withdrawn for reasons not anymore digitally available.

Best Regards

Andreas Oxenstierna
T-Kartor Geospatial AB
Olof Mohlins väg 12 Kristianstad
mobile: +46 733 206831
mailto: andreas.oxenstierna at t-kartor.com<mailto:andreas.oxenstierna at t-kartor.com>
www.t-kartor.com<http://www.t-kartor.com>
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
Alexandre Gacon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220609/2fac4c20/attachment-0001.htm>


More information about the gdal-dev mailing list