Hi,


I have a pgsql postgis function that last about an hour on an Hp Envy (W10,
i7-6500 CPU 2,5 Ghz 8go). This function is calculating minimum distance
between each nodes of table x (12000 nodes) and table y (42000 nodes)



FOR row IN

                   SELECT code,ST_AsEwkt(ST_StartPoint(geom)) as geom1  FROM
t_x

LOOP

                   FOR row1 IN

                            SELECT code,
ST_Distance(ST_AsEwkt(geom)::text,row.geom1) FROM t_y order by
ST_Distance(ST_AsEwkt(geom)::text,row.geom1) LIMIT 1



                   LOOP

                   END LOOP;

....





What I don't understand is that postgresql server process CPU is stable
during all that time at 30/31% with no other process running. Details of
each processor 1 to 3 shows that all 4 uses 30%. Disk and network usage are
0% (database is local) Ram usage is 47% and Postgresql server uses process
only 7,4 Mo.



My question is "Why postgres process uses such a precise and constant cpu
and doesn't grow up to more than 30% ?" I didn't find any parameter forcing
such a limit in order to reduce duration of this calculation.



Thanks for any answer,



Olivier



---
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
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to