[gdal-dev] Using the tables connection parameter correctly in ogr2ogr command for db with large number of tables with geometry columns.

Michael Smith michael.smith.erdc at gmail.com
Wed Feb 8 16:36:48 PST 2017


That's what always use with oracle driver. 

Sent from my iPhone

> On Feb 8, 2017, at 7:01 PM, Hemant Bist <hemantbist at gmail.com> wrote:
> 
> Hi,
> Is it correct to pass dummy tables that don't exist in database to ogr2ogr  command. It seems to work, but I am not sure it will work going forward(I am currently using 1.9 most
> of the work and 2.0 for some of the new code).
> eg. I passed tables=tablename_that_does_not_exis   (a dummy table name that does not exist) to following command. Note that I did not pass my_osm_data at all to tables parameter. Is that correct?
> 
> ogr2ogr -s_srs EPSG:4326 -t_srs EPSG:4326 -f "ESRI Shapefile" '/tmp/ab.shp' PG:"dbname=mydbname tables=tablename_that_does_not_exist" -sql " select * from my_osm_data limit 1"
> 
> 
> The reason I need to pass tables parameter is that without this the ogr2ogr is very slow. The db has large number of tables with geomtery columns and it seems to effectively query all geometry columns during startup. (And passing the actual set of  tables used would require me to understand all the sqls).
> 
> Thanks,
> Hemant.
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list