From a7301c86718fcc7675f9c1e20f169d9734f2d201 Mon Sep 17 00:00:00 2001 From: Dan Ungureanu Date: Wed, 23 Oct 2019 12:30:43 +0300 Subject: [PATCH] PERF: Add index on group to category_groups (#8231) --- app/models/category_group.rb | 4 ++++ ...20191022161944_add_index_on_group_to_category_groups.rb | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 db/migrate/20191022161944_add_index_on_group_to_category_groups.rb diff --git a/app/models/category_group.rb b/app/models/category_group.rb index a0cbb3f31e8..a4f5b51ef9d 100644 --- a/app/models/category_group.rb +++ b/app/models/category_group.rb @@ -23,3 +23,7 @@ end # updated_at :datetime not null # permission_type :integer default(1) # +# Indexes +# +# index_category_groups_on_group_id (group_id) +# diff --git a/db/migrate/20191022161944_add_index_on_group_to_category_groups.rb b/db/migrate/20191022161944_add_index_on_group_to_category_groups.rb new file mode 100644 index 00000000000..ba3578ca9bf --- /dev/null +++ b/db/migrate/20191022161944_add_index_on_group_to_category_groups.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddIndexOnGroupToCategoryGroups < ActiveRecord::Migration[6.0] + def change + add_index :category_groups, :group_id + end +end