Skip to content

Commit

Permalink
Move external indexes to post indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Sep 1, 2023
1 parent afdfcb4 commit a9d7d49
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
16 changes: 16 additions & 0 deletions backend/sql/post_indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ CREATE INDEX IF NOT EXISTS relations_geom_idx ON public.relations USING gist (g
CREATE INDEX IF NOT EXISTS relations_country_idx ON public.relations USING gin (country gin__int_ops);
CREATE INDEX IF NOT EXISTS relations_tags_idx ON public.relations USING gin (tags);

-- External Indexes

-- CREATE INDEX IF NOT EXISTS nodes_uid_idx ON public.nodes USING btree (uid);
-- CREATE INDEX IF NOT EXISTS nodes_changeset_idx ON public.nodes USING btree (changeset);

-- CREATE INDEX IF NOT EXISTS ways_line_uid_idx ON public.ways_line USING btree (uid);
-- CREATE INDEX IF NOT EXISTS ways_line_changeset_idx ON public.ways_line USING btree (changeset);

-- CREATE INDEX IF NOT EXISTS ways_poly_uid_idx ON public.ways_poly USING btree (uid);
-- CREATE INDEX IF NOT EXISTS ways_poly_changeset_idx ON public.ways_poly USING btree (changeset);

-- CREATE INDEX IF NOT EXISTS relations_uid_idx ON public.relations USING btree (uid);
-- CREATE INDEX IF NOT EXISTS relations_changeset_idx ON public.relations USING btree (changeset);

-- clustering nodes
CLUSTER nodes USING nodes_geom_idx;
-- clustering ways_line
Expand All @@ -61,3 +75,5 @@ ANALYZE nodes;
ANALYZE ways_line;
ANALYZE ways_poly;
ANALYZE relations;


12 changes: 0 additions & 12 deletions backend/sql/pre_indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@
-- # 1100 13th Street NW Suite 800 Washington, D.C. 20005
-- # <[email protected]>

-- CREATE INDEX IF NOT EXISTS nodes_uid_idx ON public.nodes USING btree (uid);
-- CREATE INDEX IF NOT EXISTS nodes_changeset_idx ON public.nodes USING btree (changeset);

-- CREATE INDEX IF NOT EXISTS ways_line_uid_idx ON public.ways_line USING btree (uid);
-- CREATE INDEX IF NOT EXISTS ways_line_changeset_idx ON public.ways_line USING btree (changeset);

-- CREATE INDEX IF NOT EXISTS ways_poly_uid_idx ON public.ways_poly USING btree (uid);
-- CREATE INDEX IF NOT EXISTS ways_poly_changeset_idx ON public.ways_poly USING btree (changeset);

-- CREATE INDEX IF NOT EXISTS relations_uid_idx ON public.relations USING btree (uid);
-- CREATE INDEX IF NOT EXISTS relations_changeset_idx ON public.relations USING btree (changeset);


CREATE EXTENSION IF NOT EXISTS btree_gist;
CREATE EXTENSION IF NOT EXISTS postgis;
Expand Down

0 comments on commit a9d7d49

Please sign in to comment.