-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
account_deletions get stuck while selecting participations
Following query takes over 20 minutes and fills up the database: SELECT * FROM participations WHERE author_id = XXXXX On servers with a huge participations-table this is a serious performance issue which is easily fixed by the author_id index Signed-off-by: Lukas Matt <lukas@zauberstuhl.de>
- Loading branch information
Lukas Matt
committed
Mar 27, 2016
1 parent
0cbb123
commit 16275ec
Showing
2 changed files
with
7 additions
and
1 deletion.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
db/migrate/20160327103605_add_author_id_index_to_participations.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddAuthorIdIndexToParticipations < ActiveRecord::Migration | ||
def change | ||
add_index :participations, :author_id, :using => :btree | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters