[Mapserver-users] querybyattribute php mapscript

Markus Schnider sp_ml at sourcepole.com
Tue Jun 29 10:59:53 EDT 2004


Hi all

I'm working with chameleon (viewer, based on php_mapscript).
Which is the best query (performance) to get extents from a layer?

$oQueryStatus = $olayer->queryByAttributes('town', 'town=150', MS_MULTIPLE);
the query works, but is not very fast.

I would use the query function for different databases (ARCsde, postgis and 
also on shapefiles).
Do I have to difference between the databases, create always a best query for 
one database, ...?

One try was with postgresql (postgis).
the log:
...
SELECT * FROM plsscpy3 LIMIT 0
BEGIN
DECLARE mycursor2 BINARY CURSOR FOR SELECT 
gid::text,area::text,perimeter::text,town::text,rdir::text,rang::text,sect::text,trsmatch::text,acres::text,perfeet::text,asbinary(force_collection(force_2d(the_geom)),'NDR') 
from plsscpy3 WHERE OID = 6378143
...

I suppose that the function saves ALL rows in the cache and searches the row. 
Then it declares a cursor with the OID.

Thanks in advance

Markus Schnider




More information about the mapserver-users mailing list