I want to use ECQL in order to filter some data on my browser. I have a postgis table which will have around 300k of rows. Bringing this layer at once might make things a bit slow. I was wondering how ECQL works. When you filter something, does it bring the whole layer on the client and then filters it? Or it sends requests to the server and returns only what is asked?

  • 1
    it would depend on how you use the filter – Ian Turton Jan 20 '16 at 9:39
  • Can you please be a bit more specific. I don't intend to load the whole layer initially and then use the filter. I want to create the layer as invisible and then upon writing a CQL request to click a button to update results. When a layer is invisible then is not loaded, right? And in this case when I click the button, I will only get the features requested. Am I correct? – user1919 Jan 20 '16 at 10:12
  • is this a wms or a wfs request? why not write a short test and see what happens? – Ian Turton Jan 20 '16 at 10:37
  • Its a WMS request. Yes I will write a test. But as I am quite short in time I was trying to save some time. Thanks anyways. – user1919 Jan 20 '16 at 10:45

A WMS request returns an image that is generated on the server so the CQL filter must be executed there. If you have a supported query then GeoServer will pass the CQL filter down to the PostGIS (or other) database for further speed savings (unless it's Oracle when it may slow down :-( ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.