From f557a076d0860eb6b1c122c32d5650800320e08a Mon Sep 17 00:00:00 2001 From: cquest Date: Mon, 25 Apr 2016 10:33:22 +0200 Subject: [PATCH] Home page speed up index --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4110209b..184a8f6b 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,10 @@ may want to add an index. For that, you sould do so: ALTER FUNCTION to_tsvector(text) IMMUTABLE; CREATE INDEX search_idx ON leaflet_storage_map USING gin(to_tsvector(unaccent(name)), share_status); +To speep up umap home page rendering on large instance, the following index can be added too (make sure you set the center to your default instance map center): + + CREATE INDEX leaflet_storage_map_optim ON leaflet_storage_map (modified_at) WHERE ("leaflet_storage_map"."share_status" = 1 AND ST_Distance("leaflet_storage_map"."center", ST_GeomFromEWKT('SRID=4326;POINT(2 51)')) > 1000.0); + ## Translating Everything is managed through Transifex: https://www.transifex.com/projects/p/umap/