http://blog.araz.me/posts/optimising-postgis-spatial-joins-for-10m-gps-traffic-points
Optimising PostGIS Spatial Joins for 10M+ GPS Traffic Points