<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">Matt,<br><br>I suggest to enhance the PostgreSQL performance at first. Each table with geometry must have a GiST spatial <br>index. When you upload a shape file to PostgreSQL, the shp2pgsql creates this index specifying the -I <br>parameter.<br><br>Have you uploaded your data in this way ?<br><br>If the geometry have been modified with PostGIS, you must recompute statistics to have the index updated.<br><br>Check if you have a spatial index in your table.<br><br>Cheers from México<br><br><div style="font-weight: bold; color: rgb(0, 96, 191);">IC Carlos Ruiz</div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b>
mattmendick <matt.mendick@pictometry.com><br><b><span style="font-weight: bold;">To:</span></b> mapserver-users@lists.osgeo.org<br><b><span style="font-weight: bold;">Sent:</span></b> Tue, December 21, 2010 8:48:19 AM<br><b><span style="font-weight: bold;">Subject:</span></b> [mapserver-users] long-running postgres queries initiated by mapserver<br></font><br>
<br>Hi All-<br><br>I'm running mapserver 5.6.3 under centos 5.4, using fastcgi. I'm using<br>postgres as the data storage container, and mapserver is primarily serving<br>WFS requests. Sometimes, people do WFS queries that take a very long time<br>(searching for "virginia" on a nation-wide layer) and eventually postgres<br>will return with the result after a long time (hours later), however the<br>client has cancelled the WFS request. Is there any way for mapserver to<br>know that the client has cancelled the http request, and it can therefore<br>stop the DB query to postgres? I tried using persistent and non-persistent<br>connections with this:<br><br>PROCESSING "CLOSE_CONNECTION=DEFER"<br><br>but that didn't change the behavior.<br><br>Thanks a lot!<br>-- <br><span>View this message in context: <a target="_blank"
href="http://osgeo-org.1803224.n2.nabble.com/long-running-postgres-queries-initiated-by-mapserver-tp5855539p5855539.html">http://osgeo-org.1803224.n2.nabble.com/long-running-postgres-queries-initiated-by-mapserver-tp5855539p5855539.html</a></span><br>Sent from the Mapserver - User mailing list archive at <a target="_blank" href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><span><a target="_blank" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span><br></div></div>
</div><br></body></html>