Skip to content

Commit

Permalink
Add problem(external_id) database index.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Feb 18, 2022
1 parent 5a68f8b commit 70cd0bd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db/downgrade_0076---0075.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DROP INDEX problem_external_id_idx;

1 change: 1 addition & 0 deletions db/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ create table problem (
);
create index problem_state_latitude_longitude_idx on problem(state, latitude, longitude);
create index problem_user_id_idx on problem ( user_id );
create index problem_external_id_idx on problem(external_id);
create index problem_external_body_idx on problem(lower(external_body));
create index problem_radians_latitude_longitude_idx on problem(radians(latitude), radians(longitude));
create index problem_bodies_str_array_idx on problem USING gin(regexp_split_to_array(bodies_str, ','));
Expand Down
1 change: 1 addition & 0 deletions db/schema_0076-add-index-problem-external_id.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE INDEX CONCURRENTLY problem_external_id_idx on problem(external_id);

0 comments on commit 70cd0bd

Please sign in to comment.