Skip to content

Commit

Permalink
PERF: speed up counting of unread notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed May 14, 2015
1 parent e6f73a1 commit 1eeed5f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions db/migrate/20150514023016_add_unread_notifications_index.rb
@@ -0,0 +1,5 @@
class AddUnreadNotificationsIndex < ActiveRecord::Migration
def change
add_index :notifications, [:user_id, :notification_type], where: 'not read', name: 'idx_notifications_speedup_unread_count'
end
end

0 comments on commit 1eeed5f

Please sign in to comment.