FILTER slow

Stephan Holl stephan.holl at INTEVATION.DE
Thu Sep 13 03:49:33 PDT 2007


Hello Andreas,

Andreas Albarello <andreas.albarello at territoriumonline.com>, [20070913
- 12:22:22]

> Stephan Holl wrote:
> > I have a problem using the FILTER inside a shape-layer. It turns out
> > that the filters are getting quite slow when using more than ~500
> > or-validations.
> > 
> > The filter gets applied by mapscript based on an
> > external-database query-result. Are there some tuning-tipps how to
> > 'filter' (shape)-datasets with large results efficient?
> > 
> > Currently the filter looks like this
> >  LAYER
> >     DATA "adr"
> >       FILTER ( [adr_id] = 6446 OR [adr_id] = 6366 OR [adr_id] =
> > 6483 OR [adr_id] = 6534 OR [adr_id] = 6535 OR [adr_id] = 6481 OR
> > [adr_id] = 6489 OR [adr_id] = 6490 OR [adr_id] = 6478 OR [adr_id] =
> > 6587 OR [adr_id] = 6484 OR [adr_id]
> > [many more follow]
> 
> Stephan,
> 
> I've never done any benchmarking of this stuff myself, so I really
> don't know if this is going to be of any advantage, but you might try
> to use this syntax which should yield to the exact same results but
> is much more concise and should therefore at least take less parsing
> effort by Mapserver:
> 
> FILTER ([adr_id] IN '6446,6366,6483,...')

Thanks for the tip, but unfortunately it does not solve my problem. The
filter does not get applied, it does not show up at all with your
syntax above.
 
> This is actually some sort of undocumented query syntax, so don't
> tell anybody ;)
> 
> I'd appreciate it if you'd report back whether this actually was of
> any help or not.

Sure, bute no success yet! I will play with the filter a little more
though.

Best regards

	Stephan

-- 
Stephan Holl <stephan.holl at intevation.de>, http://intevation.de/~stephan
Tel: +49 (0)541-33 50 8 32 | Intevation GmbH | AG Osnabrück - HR B 18998
Geschäftsführer:  Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner



More information about the MapServer-users mailing list