diff --git a/Changelog.md b/Changelog.md index 048560d33..9fa476b1c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -15,6 +15,7 @@ # 0.7.9.0 ## Refactor +* Improve public stream performance and cleanup unused indexes [#7944](https://github.com/diaspora/diaspora/pull/7944) ## Bug fixes diff --git a/db/migrate/20181227235201_clean_up_posts_indexes.rb b/db/migrate/20181227235201_clean_up_posts_indexes.rb new file mode 100644 index 000000000..268282155 --- /dev/null +++ b/db/migrate/20181227235201_clean_up_posts_indexes.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class CleanUpPostsIndexes < ActiveRecord::Migration[5.1] + def change + remove_index :posts, %i[id type created_at] + remove_index :posts, :tweet_id + add_index :posts, %i[created_at id] + end +end