diff options
author | Charles de Bueger <chabekah@gmail.com> | 2012-12-03 20:57:40 +0200 |
---|---|---|
committer | Charles de Bueger <chabekah@gmail.com> | 2012-12-03 20:57:40 +0200 |
commit | c32c65597931e9e074dd590736bd1f0b645745c4 (patch) | |
tree | a112d036639221488bde02cf0099454d7b9e8d1f /db | |
parent | 562dc9f49348b60cc9e6eb185ef2f8badbb65c32 (diff) | |
download | refinerycms-blog-c32c65597931e9e074dd590736bd1f0b645745c4.tar.gz refinerycms-blog-c32c65597931e9e074dd590736bd1f0b645745c4.tar.bz2 refinerycms-blog-c32c65597931e9e074dd590736bd1f0b645745c4.zip |
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.
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20110803223522_create_blog_structure.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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 |