BayAreaMetro / zoning

:house_with_garden: :department_store: :factory: Determine the Zoning of a Parcel
http://bayareametro.github.io/zoning/
5 stars 2 forks source link

improve performance of geometry intersections #9

Closed tbuckl closed 9 years ago

tbuckl commented 9 years ago

intersecting parcels/zoning geometries takes around 30 minutes on an ubuntu VM with 100 GB ram thats tuned with pgtune for max 5 connections. https://github.com/MetropolitanTransportationCommission/zoning/blob/master/process/parcel_zoning_intersection.sql#L94-L104

doing this intersection and calculating the areas of overlap takes over 2 hrs https://github.com/MetropolitanTransportationCommission/zoning/blob/master/process/parcel_zoning_intersection.sql#L119-L137

see whether postgres is storing the geometries for these data as TOAST tables?

http://postgis.net/docs/manual-1.4/ch06.html

tbuckl commented 9 years ago

could try sending this to server, suggested in article above: SET enable_seqscan TO off;