As I told I copied both Postgis queries from logs to pgAdmin and ran them without MapServer. Both took about 200ms. So it seems that bottleneck is in Mapserver. -- Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html