title: Slow indexing of 300GB Postgis table
body: <p>I am loading about 300GB of contour line data in to an postgis table. To speed up the process i read that it is fastest to first load the data, and then create an index. Loading the data only took about 2 days, but now I have been waiting for the index for about 30 days, and it is still not ready.</p>
  
  <p>The query was:</p>
  
  <pre><code>create index idx_contour_geom on contour.contour using gist(geom);
  </code></pre>
  
  <p>I ran it in pgadmin4, and the memory consumption of the progran has varied from 500MB to 100GB++ since.</p>
  
  <p>Is it normal to use this long time to index such a database?</p>
  
  <p>Any tips on how to speed up the process?</p>
  
  <p>Edit:
  The data is loaded from 1x1 degree (lat/lon) cells (about 30.000 cells) so no line has a bounding box larger than 1x1 degree, most of then should be much smaller. They are in EPSG:4326 projection and the only attributes are height and the geometry (geom).</p>