Permalink
Browse files

Update db/migrate/20110803223522_create_blog_structure.rb

I noticed a bit of performance lag (thanks to new relic) on the blog index page (which loads all categories and comments at the same time). I see that the blog_comments table is lacking an index on the actual blog_post_id - meaning it will take a bit longer than we might like to find all the comments for a given blog.
  • Loading branch information...
charlesdeb committed Dec 3, 2012
1 parent 562dc9f commit c32c65597931e9e074dd590736bd1f0b645745c4
Showing with 1 addition and 0 deletions.
  1. +1 −0 db/migrate/20110803223522_create_blog_structure.rb
@@ -31,6 +31,7 @@ def up
end
add_index :refinery_blog_comments, :id
+ add_index :refinery_blog_comments, :blog_post_id
create_table :refinery_blog_categories do |t|
t.string :title

0 comments on commit c32c655

Please sign in to comment.