From c32c65597931e9e074dd590736bd1f0b645745c4 Mon Sep 17 00:00:00 2001 From: Charles de Bueger Date: Mon, 3 Dec 2012 20:57:40 +0200 Subject: 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. --- db/migrate/20110803223522_create_blog_structure.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'db') diff --git a/db/migrate/20110803223522_create_blog_structure.rb b/db/migrate/20110803223522_create_blog_structure.rb index a59b90f..3be7eee 100644 --- a/db/migrate/20110803223522_create_blog_structure.rb +++ b/db/migrate/20110803223522_create_blog_structure.rb @@ -31,6 +31,7 @@ class CreateBlogStructure < ActiveRecord::Migration 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 -- cgit v1.2.3