[Geoserver-users] filter on envelope for postgis?

While looking for various performance improvements against my large dataset
in PostGIS, I came across a suggestion in the PostGIS manual at
http://postgis.refractions.net/docs/ch05.html. The suggestion is to create a
new geometry column and populate it with:
  UPDATE mytable set bbox = Envelope(Force_2d(the_geom));

This considerably speeds up the slow queries I tested directly against the
pgAdmin III interface. Is there a way to take advantage of this in
GeoServer? That is, can I specify the envelope column for the WHERE clause,
but continue to have the_geom column in the SELECT clause?

TIA,
Craig
--
View this message in context: http://www.nabble.com/filter-on-envelope-for-postgis--tp16288823p16288823.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

geoman ha scritto:

While looking for various performance improvements against my large dataset
in PostGIS, I came across a suggestion in the PostGIS manual at
http://postgis.refractions.net/docs/ch05.html. The suggestion is to create a
new geometry column and populate it with:
  UPDATE mytable set bbox = Envelope(Force_2d(the_geom));

This considerably speeds up the slow queries I tested directly against the
pgAdmin III interface.

Can you quantify that "considerably"? 20%? 10 times?

Is there a way to take advantage of this in
GeoServer? That is, can I specify the envelope column for the WHERE clause,
but continue to have the_geom column in the SELECT clause?

Nope, there is no way to do so, at least not for WMS.
For WFS yes, you can manually select one and filter on the other, but it's not transparent.

Cheers
Andrea