0

I have a csv file of 144 millions different points with latitude and longitude values. Using the following SQL statement, it currently takes me more than 24 hours to upload the data:

CREATE TABLE pts(gid serial PRIMARY KEY, geom geometry(POINTZ, 3005));

Do you know if there is a way you could upload all the data faster?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Ian Moffit
  • 357
  • 1
  • 11
  • 5
    What tool are you using to import the data from CSV ? – robin loche Oct 07 '22 at 07:02
  • 1
    Why are you using pointz, which is for 3d points, for lat long values? Also, as Robin said, how are you uploading the points? As discussed in this post https://gis.stackexchange.com/questions/58605/which-function-for-creating-a-point-in-postgis, there are large performance differences between approaches. – jgm_GIS Oct 07 '22 at 11:38
  • Maybe you should first read the CSV data into PostgreSQL with COPY and build the PostGIS geometries then based on the imported table. Or perhaps you do that already. – user30184 Oct 07 '22 at 14:05

0 Answers0