[postgis-devel] knn test - first result
maplabs at light42.com
maplabs at light42.com
Fri May 20 23:59:01 PDT 2011
>
> I can't see how knn would help st_dwithin. The thing with knn is that
> the index returns the result in order.....
ok, I am starting to understand this a little bit more..
yes, I picked a bad example.. too hasty, as usual...
>
> BTW, have you patched PostGIS 1.4 to compile it against PostgreSQL 9.1?
> I ask because ticket 940 http://trac.osgeo.org/postgis/ticket/940#
> should make it impossible otherwise if Paul didn't fix 1.4 too.
>
misunderstanding there.. maybe this following one is formatted more clearly
Is this a better test?
---------------------
KNN Tester #2
--------------------
explain analyze select name, geonameid from us_locations
where
st_distance(thepoint_lonlat,st_geomfromEWKT('SRID=4326;POINT(-86.6296824
31.2590605)') ) < 0.01;
=============================================================================================
aced 2 core amd
PostgreSQL 8.4.7 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real
(Debian 4.4.5-8) 4.4.5, 64-bit
POSTGIS="1.4.1SVN" GEOS="3.3.0-CAPI-1.7.0" PROJ="Rel. 4.7.1, 23
September 2009" USE_STATS
Seq Scan on us_locations (cost=0.00..73458.36 rows=628741 width=26)
(actual time=0.129..2847.318 rows=2 loops=1)
Filter: (st_distance(thepoint_lonlat,
'0101000020E610000079B768B74CA855C0772FF7C951423F40'::geometry) <
0.01::double precision)
Total runtime: 2847.457 ms
=============================================================================================
xps 4 core intel
PostgreSQL 9.0.3 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real
(Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5, 64-bit
POSTGIS="1.5.3SVN" GEOS="3.3.0-CAPI-1.7.0" PROJ="Rel. 4.7.1, 23
September 2009" LIBXML="2.7.7" USE_STATS
Seq Scan on us_locations (cost=0.00..540426.01 rows=628900
width=26) (actual time=0.019..1692.868 rows=2 loops=1)
Filter: (st_distance(thepoint_lonlat,
'0101000020E610000079B768B74CA855C0772FF7C951423F40'::geometry) <
0.01::double precision)
Total runtime: 1692.888 ms
=============================================================================================
devel 2-core virtual machine on xps
PostgreSQL 9.1beta1 on i686-pc-linux-gnu, compiled by GCC gcc (Debian
4.4.5-8) 4.4.5, 32-bit
POSTGIS="2.0.0SVN" GEOS="3.3.0rc1-CAPI-1.7.0" PROJ="Rel. 4.7.1, 23
September 2009" LIBXML="2.7.8" USE_STATS
Seq Scan on us_locations (cost=0.00..538275.26 rows=628694
width=26) (actual time=0.102..3001.324 rows=2 loops=1)
Filter: (st_distance(thepoint_lonlat,
'0101000020E610000079B768B74CA855C0772FF7C951423F40'::geometry) <
0.01::double precision)
Total runtime: 3001.547 ms
>
More information about the postgis-devel
mailing list