Speed up public stream and remove obsolete indexes

closes #7944
This commit is contained in:
CSammy 2018-12-28 01:01:52 +01:00 committed by Benjamin Neff
parent 5a0381f832
commit a21cde4c00
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 10 additions and 0 deletions

View file

@ -1,6 +1,7 @@
# 0.7.9.0
## Refactor
* Improve public stream performance and cleanup unused indexes [#7944](https://github.com/diaspora/diaspora/pull/7944)
## Bug fixes

View file

@ -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