[postgis-users] CPU tuning
Olivier Leprêtre
o.lepretre at gmail.com
Mon Jan 9 10:29:43 PST 2017
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:postgis-users-bounces at lists.osgeo.org] 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 <remi.cura at gmail.com>:
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170109/b0594ee2/attachment.html>
More information about the postgis-users
mailing list