From 1aa7cf842a9a1e98a4b4cf0101ff470f92f0d2f1 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 17 Jun 2015 18:05:52 +1000 Subject: [PATCH] PERF: missing index on notifications this was slowing down acting on a post --- db/migrate/20150617080349_add_index_on_post_notifications.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 db/migrate/20150617080349_add_index_on_post_notifications.rb diff --git a/db/migrate/20150617080349_add_index_on_post_notifications.rb b/db/migrate/20150617080349_add_index_on_post_notifications.rb new file mode 100644 index 00000000000..a8cbccfdc8f --- /dev/null +++ b/db/migrate/20150617080349_add_index_on_post_notifications.rb @@ -0,0 +1,5 @@ +class AddIndexOnPostNotifications < ActiveRecord::Migration + def change + add_index :notifications, [:user_id, :topic_id, :post_number] + end +end