Skip to content
This repository

Update db/migrate/20110803223522_create_blog_structure.rb #305

Merged
merged 1 commit into from over 1 year ago

2 participants

Charles de Bueger Uģis Ozols
Charles de Bueger

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.

Charles de Bueger 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.
c32c655
Uģis Ozols ugisozols merged commit 78b88eb into from December 03, 2012
Uģis Ozols ugisozols closed this December 03, 2012
Uģis Ozols
Owner

Thanks @charlesdeb!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Dec 03, 2012
Charles de Bueger 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.
c32c655
This page is out of date. Refresh to see the latest.
1  db/migrate/20110803223522_create_blog_structure.rb
@@ -31,6 +31,7 @@ def up
31 31
     end
32 32
 
33 33
     add_index :refinery_blog_comments, :id
  34
+    add_index :refinery_blog_comments, :blog_post_id
34 35
 
35 36
     create_table :refinery_blog_categories do |t|
36 37
       t.string :title
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.