On Tue, 31 May 2022 at 20:11, Olivier Gagnon <mcno...@hotmail.com> wrote:

> Hi,
>
> I'm facing very slow WFS queries with geopackage (sqlite).
>
> If I use PropertyIsBetween filter, Geoserver formats the SQL query
> including the filter in the where clause :
>
> WHERE ("ID" BETWEEN 1 AND 1000 AND "ID" IS NOT NULL )
>
> But when PropertyIsLike is used, geoserver doesn't add it to the SQL where
> clause thus preventing the use of the sqlite db engine and perform the
> filter itself which is very slow.
>
> I tried using a FTS5 virtual table but geoserver doesn't "see" it even
> with a sql view.
>
> Is there a way to indicate to geoserver to use db engine to perform the
> like clause ?
>

You would need to modify the GeoPkgFilterToSQL code (
https://github.com/geotools/geotools/blob/main/modules/plugin/geopkg/src/main/java/org/geotools/geopkg/GeoPkgFilterToSQL.java)
to handle that construct, though I would have expected the default JDBC
class (
https://github.com/geotools/geotools/blob/494d2e0a7bd004d7fb7c6d758eb6a3597acda9fc/modules/library/jdbc/src/main/java/org/geotools/data/jdbc/FilterToSQL.java#L514)
to handle it.

Can you provide an example of the query that is not working?

Ian



> Thanks
>
> Envoyé à partir d’Outlook <http://aka.ms/weboutlook>
> _______________________________________________
> 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
>


-- 
Ian Turton
_______________________________________________
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