[DebianGIS-dev] Bug#502186: postgis ST_SPHEROID_LENGTH slow

David Vaz davidvaz at dcc.fc.up.pt
Tue Oct 14 10:40:51 UTC 2008


Package: postgis
Version: 1.3.3-3

Since debian testing introduced postgresql-8.3 and postgis 1.3.3 for
postgresql-8.3. The problem I am facing is that length_spheroid is much
slower in postgres-8.3 from under 1s to about 60s (See Bellow).

Both databases are equal, tested in same machine, with different
installations to avoid software versions conflicts.

FIRST:
postgresql-8.2 (version 8.2.7-2+b1) with postgis (version 1.3.2-1)

EXPLAIN ANALYSE select length_spheroid(geom,'SPHEROID["WGS
84",6378137,298.257223563]') FROM test order by id limit 100;

QUERY
PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=0.00..17.44 rows=100 width=26054) (actual
time=1.852..588.394 rows=100 loops=1)
   ->  Index Scan using test_pkey on test  (cost=0.00..2268.52
rows=13010 width=26054) (actual time=1.850..588.298 rows=100 loops=1)
 Total runtime: 588.495 ms
(3 rows)

SECOND:
postgresql-8.3 (version 8.3.4-1) with postgis (version 1.3.3-3)

EXPLAIN ANALYSE select length_spheroid(geom,'SPHEROID["WGS
84",6378137,298.257223563]') FROM test order by id limit 100;

QUERY
PLAN

------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=0.00..11.07 rows=100 width=36) (actual
time=219.032..59913.512 rows=100 loops=1)
   ->  Index Scan using test_pkey on tracker_track  (cost=0.00..1439.93
rows=13010 width=36) (actual time=219.029..59913.377 rows=100 loops=1)
 Total runtime: 59913.701 ms
(3 rows)





More information about the Pkg-grass-devel mailing list