FILTER slow

Andreas Albarello andreas.albarello at TERRITORIUMONLINE.COM
Thu Sep 13 04:57:35 PDT 2007


Stephan Holl wrote:
> Thanks for that, I had spaces between the entries... now it works, but
> I cannot see any speed improvements... Perhaps I should try postgis and
> greate Querys on-the-fly.
> 
> Perhaps there are other suggestions which may lead to more performance?
> Is it worth to index the shapefile in such cases (about 3000 entries)?

So it isn't the parsing that takes all the time but the actual match of 
each shape's attribute value against each value contained in the FILTER. 
That makes sense and syntax tuning is therefore not an option in this case.

I highly doubt though that quadtree-indexing the shapefile is going to 
help in this case. It's my understanding that shptree, if that's what 
you mean, generates a spatial index which is useless for attribute 
matching as in your case. I don't know if there's some other attribute 
based indexing (dbf indexing, that is).

A spatial database however might be worth a try. You'd probably want to 
have an index on that column and you could just keep applying a FILTER, 
albeit with a different syntax, for PostGIS for instance

FILTER "adr_id IN (6446, 6366, ...)"

Best regards,
-- 
--------------------------------------------------------------------
Andreas Albarello
Analysis & SW Development

Territorium Online srl/GmbH
Via Buozzi/Buozzistraße 12 - I 39100 Bolzano/Bozen
email: andreas.albarello at territoriumonline.com
web:   www.territoriumonline.com
--------------------------------------------------------------------



More information about the MapServer-users mailing list