Re: [Geoserver-devel] SQL views and performance

2017-03-21 Thread Gabriel Vatin
Great, thanks to both of you. Now I see clearer on how to debug and improve this. If I get something that would be useful to all, after improving the queries, I'll share the trick! Gabriel Le 21/03/2017 à 12:58, Jonathan Moules a écrit : Hi Gabriel, If you turn the GeoServer logging level to

Re: [Geoserver-devel] SQL views and performance

2017-03-21 Thread Andrea Aime
On Mon, Mar 20, 2017 at 6:34 PM, Gabriel Vatin wrote: > Thanks Andrea for the quick answer. What I can't really guess for now, is > when and how is the SQL view executed : does the BBOX attribute of GetMap > queries affect this SQL view (when no parameter in the view definition) ? > Yes, just lik

Re: [Geoserver-devel] SQL views and performance

2017-03-21 Thread Jonathan Moules
Hi Gabriel, If you turn the GeoServer logging level to Geotools-developer level, the log file will then include the SQL query that is sent to the database. This should facilitate debugging this issue. You can then try running the query against your database's EXPLAIN syntax - which shows how yo

Re: [Geoserver-devel] SQL views and performance

2017-03-20 Thread Gabriel Vatin
Thanks Andrea for the quick answer. What I can't really guess for now, is when and how is the SQL view executed : does the BBOX attribute of GetMap queries affect this SQL view (when no parameter in the view definition) ? The type of query to create a new layer is done so : I have a whole "go

Re: [Geoserver-devel] SQL views and performance

2017-03-20 Thread Andrea Aime
Hi Gabriel, it seems your database of choice has real trouble figuring out a good access plan for those queries. Hard to say if the db should be able to just figure out that the outer spatial index can be executed directly in the inner query or not without seeing the query. Normally postgis/postgr