aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Day <steve@mysociety.org>2014-08-01 14:31:02 +0100
committerSteven Day <steve@mysociety.org>2014-08-01 14:31:02 +0100
commit02d075351102075b5529345611a70410e088b90f (patch)
tree9110adcc25569a977aad452a2c0e29b6c49b3eb2
parent958c4f2a41bfaa8949b4ee466265c70843dd459d (diff)
Add an index for event_type on info_request_events
Selecting request events for a particular body is slow because we need to filter the events by event_type and don't currently have an index on that field. This should speed that up. Closes #1709
-rw-r--r--db/migrate/20140801132719_add_index_to_info_request_events.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/db/migrate/20140801132719_add_index_to_info_request_events.rb b/db/migrate/20140801132719_add_index_to_info_request_events.rb
new file mode 100644
index 000000000..5f0a77eac
--- /dev/null
+++ b/db/migrate/20140801132719_add_index_to_info_request_events.rb
@@ -0,0 +1,5 @@
+class AddIndexToInfoRequestEvents < ActiveRecord::Migration
+ def change
+ add_index :info_request_events, :event_type
+ end
+end