2017-01-09 12:21 GMT-02:00 Rémi Cura <[email protected]>: > postgres 9.4 is non-parallelised, what you see is that postgres use 100% > of a core, but the core beig used is rotated, > which mean the average usage of your cpu is 100% / 4 (your number of core), > which might be the explaination for your 30%. >
Exactly! I was write something like this. Please, try the query: FOR row in SELECT DISTINCT ON (t_x.code, t_y.code) t_x.code, t_y.code, ST_Distance(t_x.geom, t_y.geom) FROM t_x, t_y ORDER BY t_x.code, t_y.code, ST_Distance(t_x.geom, t_y.geom) LOOP -- Do something here END LOOP; The query above use less conversions, may be more efficient.
_______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/postgis-users
