Commit 633b52cb3f3ac13a9a8db16003fa479f501285ec

Authored by Braulio Bhavamitra
Committed by Rodrigo Souto
1 parent 56965b04

Speed up articles fetch

db/migrate/20140708121356_index_articles_filtered_fields.rb 0 → 100644
... ... @@ -0,0 +1,13 @@
  1 +class IndexArticlesFilteredFields < ActiveRecord::Migration
  2 + def self.up
  3 + %w[articles article_versions].each do |table|
  4 + add_index table, [:parent_id]
  5 + add_index table, [:path]
  6 + add_index table, [:path, :profile_id]
  7 + end
  8 + add_index :articles, [:type]
  9 + add_index :articles, [:type, :parent_id]
  10 + add_index :articles, [:type, :profile_id]
  11 + end
  12 +
  13 +end
... ...