Skip to content
This repository has been archived by the owner on Mar 20, 2018. It is now read-only.

Commit

Permalink
Added index to member id on sent email table to hopefully speed up query
Browse files Browse the repository at this point in the history
  • Loading branch information
michdsouza committed Dec 21, 2012
1 parent 69263fb commit b092401
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddIndexToMemberIdInSentEmailTable < ActiveRecord::Migration
def change
add_index :sent_emails, :member_id
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20121221190432) do
ActiveRecord::Schema.define(:version => 20121221195144) do

create_table "bounced_emails", :force => true do |t|
t.text "raw_content"
Expand Down Expand Up @@ -291,6 +291,7 @@

add_index "sent_emails", ["clicked_at"], :name => "index_sent_emails_on_clicked_at"
add_index "sent_emails", ["created_at"], :name => "index_sent_emails_on_created_at"
add_index "sent_emails", ["member_id"], :name => "index_sent_emails_on_member_id"
add_index "sent_emails", ["opened_at"], :name => "index_sent_emails_on_opened_at"
add_index "sent_emails", ["petition_id"], :name => "index_sent_emails_on_petition_id"
add_index "sent_emails", ["signature_id"], :name => "index_sent_emails_on_signature_id"
Expand Down

0 comments on commit b092401

Please sign in to comment.