kartoza / sawps

SANBI WPS
https://kartoza.github.io/sawps/
GNU Affero General Public License v3.0
0 stars 6 forks source link

Database space is getting filled up when there are too many sessions #2066

Open danangmassandy opened 6 months ago

danangmassandy commented 6 months ago

This issue is caused by the usage of materialized view to store temporary results from filtering. This views are used to generate the vector tile of choropleth map (properties+province). My proposed solution is to switch to a standar view (not materialized one) in exchange of the speed when generating the vector tile.

On other hand, the generation of map session is too much, it's being generated when user goes to the map page. When the screen is refreshed, the session is regenerated and causing many materialized views are created in the database. We should store this session into the cookie/local storage, so the user can reuse it.