rails f log/development.log查看sql执行时间,来选择加索引的字段
非常的有效,效果扛扛的
config.action_controller.perform_caching = true#实际中改一下为true
测试时改为false
4.2 Being SpecificIf you need to run a specific migration up or down the db:migrate:up and db:migrate:down tasks will do that. Just specify the appropriate version and the corresponding migration will have its up or down method invoked, for example
rake db:migrate:up VERSION=20080906120000
will run the up method from the 20080906120000 migration. These tasks check whether the migration has already run, so for example db:migrate:up VERSION=20080906120000 will do nothing if Active Record believes that 20080906120000 has already been run.
查看更多关于rails f log/development.log查看sql执行时间,来选择加索引的字段的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did43244