koopjs / koop-pgcache

PostGIS cache for Koop.
Other
4 stars 4 forks source link

Optimization: Inserts + Indexing #52

Closed dmfenton closed 8 years ago

dmfenton commented 8 years ago

The PR allows providers to disable the creation of indexes when the table is created. It also adds an API for providers to create geohash, geometry, field indexes at will. If indexes are present when the table is created each successive insert will cause the full index to rewrite. Waiting until after the tables are written to add indexes significantly improves performance.

Goal: Significantly reduce DB CPU and Disk usage during data insertion.