Hello Andrea!

Thanks for your answer!
We will also try a newer GeoServer in future.

Just some measures with our postgres-DB containing around 100.000 entries in 
the table, filtering 1800 of it via IDs and GeoServer 2.7.1.1:
Request without filter: ~150ms
Request with a CQL Filter: ~1500ms
Same request with FeatureID: ~210ms

Best Regards,
Bernhard

Von: andrea.a...@gmail.com [mailto:andrea.a...@gmail.com] Im Auftrag von Andrea 
Aime
Gesendet: Montag, 05. März 2018 10:11
An: Bernhard Kiselka
Cc: Ian Turton; geoserver-users@lists.sourceforge.net
Betreff: Re: [Geoserver-users] GeoServer slowing down with bigger CQL filters

On Mon, Mar 5, 2018 at 9:52 AM, Bernhard Kiselka 
<bernhard.kise...@prisma-solutions.at<mailto:bernhard.kise...@prisma-solutions.at>>
 wrote:
Hi Ian!

Thanks for you answer!

I understand that parsing 20KB takes some time.
But why does in slow down exponentically (see digram in 
https://gis.stackexchange.com/a/82305 )?

Could be a result of the algorithm doing the parsing, or the in memory 
representation building, or the filter simplification
in the middle, hard to say. For sure none of the filter management in GeoTools 
was built with such a large filter in mind.
However, it's open source, so you can propose an improvement, or use commercial 
support to have someone
else to do it for you.

I might be able to change the filter -  but in fact this is a "simplification" 
for needing only the ID in the GeoServer layer (and not all attributes the 
filter relys on initially).

I also had a look at the source code of GeoTools (guess 
https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/java/org/geotools/filter/visitor/SimplifyingFilterVisitor.java
 is right), but I don't understand it completely.

That simplifies filters post parsing, it's one of the things that might be 
scaling badly.

Most of all I don't understand why GeoTools needs to parse a IN statement (and 
translates it to multiple ORs).

Because the OGC standard filter model has a fixed list of filters, and "IN" is 
not one of them, pretty simple.
In the most recent versions of GeoServer there is also a "in" function that can 
be encoded in SQL (in older version there is, but it is not recognized
by the SQL encoder as thus it's executed in memory instead of being turned into 
SQL).

Regards,

Andrea Aime



==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V 
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i 
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo 
è consentito esclusivamente al destinatario del messaggio, per le finalità 
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne 
il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di 
procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro 
sistema. Conservare il messaggio stesso, divulgarlo anche in parte, 
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, 
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the 
attention and use of the named addressee(s) and may be confidential or 
proprietary in nature or covered by the provisions of privacy act (Legislative 
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in 
accord with its purpose, any disclosure, reproduction, copying, distribution, 
or either dissemination, either whole or partial, is strictly forbidden except 
previous formal approval of the named addressee(s). If you are not the intended 
recipient, please contact immediately the sender by telephone, fax or e-mail 
and delete the information in this message that has been received in error. The 
sender does not give any warranty or accept liability as the content, accuracy 
or completeness of sent messages and accepts no responsibility  for changes 
made after they were sent or for other risks which arise as a result of e-mail 
transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to