Well, thanks, could be the explanation.


I tried the query but I get SQLSTATE 53200, out of memory after a few seconds.



De : postgis-users [mailto:[email protected]] De la part de 
Marcone
Envoyé : lundi 9 janvier 2017 15:31
À : PostGIS Users Discussion
Objet : Re: [postgis-users] CPU tuning





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.








---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to