0

I am having an issue with loading MapInfo TAB format file into SQL Server table.

We have a process that is running fine which uses GDAL ogr2ogr.exe to load MapInfo TAB files we get from suppliers into SQL Server table. The file has geometry fields, date fields and string fields. The load process was relatively fast like 130,000 records gets loaded in 3 minutes.

Now, Supplier has changed the files and the issue I am having is, it taking too long to load the new set of MapInfo TAB files. Like 28 minutes to load 130,000 records. New file also has geometry fields, date fields and string fields. Plus an area field with numeric(15,2) datatype.

In total there are around 12 million records to load from one file. The process which used to complete in 4 hours before, is now taking 55 hours with the new files.

Below is the command we use, which was working ok with the old set of files.

-append -update -f MSSQLSPATIAL "MSSQL:server=SQLServerName;database=DBName;trusted_connection=yes" "location\FileName.tab" -nln TEMP.TableName -gt 10000

Not sure if it is a problem with file content. I am not very familiar working with Spatial data. Do you have any idea on this issue?

2
  • 1
    both ends of that process are poor choices, I would make sure I had dropped the indexes on my destination table and if that doesn't help consider moving to postgis
    – Ian Turton
    Jul 27, 2021 at 10:24
  • Can you provide a sample of the data in tabular form? What projection is used in the TAB and sql formats?
    – vinh
    Jul 27, 2021 at 15:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.