From edb6afd1158bbb5f701abbe339a855f1167513d6 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Sun, 3 Aug 2008 22:05:31 +0200 Subject: [PATCH] add some indexes that speed up some queries found with the help of query_reviewer at http://code.google.com/p/query-reviewer/ also fixed a removal of an index when you migrate back you need to rake db:migrate to create the indexes --- db/migrate/025_add_tag_support.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/migrate/025_add_tag_support.rb b/db/migrate/025_add_tag_support.rb index 9028fbd1..76c32ec0 100644 --- a/db/migrate/025_add_tag_support.rb +++ b/db/migrate/025_add_tag_support.rb @@ -17,6 +17,8 @@ class AddTagSupport < ActiveRecord::Migration end def self.down + remove_index :taggings, [:tag_id, :taggable_id, :taggable_type] + remove_index :tags, :name drop_table :taggings drop_table :tags end