[TinyOWS-users] Speed of GetFeature Request with 4 millions point

Marc-André Trottier marcandre_trottier at hotmail.com
Tue Aug 16 14:30:13 EST 2011


Hi!
why is it tinyows is doiing this before the main request on GetFeature :

SELECT ST_xmin(g.extent), ST_ymin(g.extent), ST_xmax(g.extent),
ST_ymax(g.extent) FROM (SELECT ST_Extent(foo.the_geom) as extent FROM (
(SELECT ST_Transform("geom_p"::geometry, 900913) AS "the_geom" FROM
admgeo1."zztiny_glissement_p"  WHERE
(_ST_Intersects(ST_Transform("geom_p",900913),'SRID=900913;POLYGON((-7991157.138672
5911315.758475,-7991157.138672 5920182.453754,-7979538.710375
5920182.453754,-7979538.710375 5911315.758475,-7991157.138672
5911315.758475))'::geometry) AND ST_Transform("geom_p",900913) &&
'SRID=900913;POLYGON((-7991157.138672 5911315.758475,-7991157.138672
5920182.453754,-7979538.710375 5920182.453754,-7979538.710375
5911315.758475,-7991157.138672 5911315.758475))'::geometry)) ) AS foo) AS g

i switched the st_transform on the polygon in fe_spatial_ops.c
(fe_bbox_layer()) but no significant gain

but something like this was very quick :

SELECT "ogc_fid",
ST_AsGML(2, ST_Transform("geom_p"::geometry,900913),0,0) AS "geom_p"
,"statut_maj","seq_no_civ","no_civq","odospec","munnom","co_postl","commentaire",
"date_maj","role"
FROM admgeo1."zz_aq_msp_adresse_geo_modif3" as A INNER JOIN (SELECT
ST_Transform('SRID=900913;POLYGON((-7989840.391427
5910916.852734,-7989840.391427 5910947.905276,-7989784.257985
5910947.905276,-7989784.257985 5910916.852734,-7989840.391427
5910916.852734))'::geometry,900913) as "the_geom") as B ON
ST_Intersects(A.geom_p, B.the_geom)

i'm trying to do the switch (where clause to inner join)

Marc-André Trottier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/tinyows-users/attachments/20110816/e54ac5c8/attachment.htm 


More information about the TinyOWS-users mailing list