Skip to content

Commit

Permalink
backend: Remove unused indexes
Browse files Browse the repository at this point in the history
At present there are few indexes that  are never used, unused indexes
can affect insert performance so they are removed.

Signed-off-by: yolossn <santhosh@kinvolk.io>
  • Loading branch information
yolossn committed Jan 20, 2021
1 parent 95a15bd commit 116bcdb
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pkg/api/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions pkg/api/db/migrations/0012_drop_unused_indexes.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- +migrate Up

drop index if exists users_team_id_idx;

drop index if exists instance_status_history_application_id_idx;

drop index if exists event_event_type_id_idx;

drop index if exists event_application_id_idx;

drop index if exists channel_package_id_idx;

-- +migrate Down

create index if not exists users_team_id_idx on users (team_id);

create index if not exists instance_status_history_application_id_idx on instance_status_history (application_id);

create index if not exists event_event_type_id_idx on event (event_type_id);

create index if not exists event_application_id_idx on event (application_id);

create index if not exists channel_package_id_idx on channel (package_id);

0 comments on commit 116bcdb

Please sign in to comment.