[Gfoss] funzione postgis lenta
Luca Delucchi
lucadeluge a gmail.com
Ven 27 Nov 2015 00:35:37 CET
2015-11-26 22:01 GMT+01:00 Luigi Pirelli <luipir a gmail.com>:
> supponendo che l'indice spaziale ovviamente ci sia, explain analyze
> della query che ti dice?
ecco quella con un punto e circa 300, quella finale qualche migliaia
di record, gira da un po' di tempo ma non ha ancora finito
osm_ledro=# explain analyze select poi_ldir(st_centroid(way)) as
ldir,name from (select way, name from planet_osm_polygon where
name='Malga Ciapa') as sel;
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------
Seq Scan on planet_osm_polygon (cost=0.00..58964.63 rows=38
width=243) (actual time=524.527..687.929 rows=1 loops=1)
Filter: (name = 'Malga Ciapa'::text)
Rows Removed by Filter: 1133044
Planning time: 0.630 ms
Execution time: 687.984 ms
osm_ledro=# explain analyze select poi_ldir(way) as ldir, tourism from
planet_osm_point where tourism='alpine_hut';
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------
Seq Scan on planet_osm_point (cost=0.00..12431.84 rows=336 width=42)
(actual time=594.090..204201.110 rows=422 loops=1)
Filter: (tourism = 'alpine_hut'::text)
Rows Removed by Filter: 280765
Planning time: 0.598 ms
Execution time: 204201.359 ms
> Luigi Pirelli
>
--
ciao
Luca
http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
Maggiori informazioni sulla lista
Gfoss