Skip to content

Commit

Permalink
Update post_indexes.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma authored Oct 13, 2023
1 parent 66107a5 commit 34eda5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/sql/post_indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ create extension if not exists intarray;
-- Only apply after grid update is done
-- Multi column index is used for the larger datasets which will have large gist index size (such as loading asia, america) to reduce amount of the index to look for spatial query , db with smaller datasets such as only with few grid level data it makes no sense , by default with lua script it will create gist index ordered with geohash method

CREATE INDEX IF NOT EXISTS nodes_country_idx ON public.nodes USING btree (country);
CREATE INDEX IF NOT EXISTS nodes_country_idx ON public.nodes USING gin (country gin__int_ops);
CREATE INDEX IF NOT EXISTS nodes_geom_idx ON public.nodes USING gist (geom);


CREATE INDEX IF NOT EXISTS ways_line_country_idx ON public.ways_line USING gin (country gin__int_ops);
CREATE INDEX IF NOT EXISTS ways_line_geom_idx ON public.ways_line USING gist (geom);


CREATE INDEX IF NOT EXISTS ways_poly_country_idx ON public.ways_poly USING btree (country);
CREATE INDEX IF NOT EXISTS ways_poly_country_idx ON public.ways_poly USING gin (country gin__int_ops);
CREATE INDEX IF NOT EXISTS ways_poly_geom_idx ON public.ways_poly USING gist (geom);

CREATE INDEX IF NOT EXISTS relations_geom_idx ON public.relations USING gist (geom);
Expand Down

0 comments on commit 34eda5b

Please sign in to comment.