Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 3 Rails查询速度_Ruby On Rails 3 - Fatal编程技术网

Ruby on rails 3 Rails查询速度

Ruby on rails 3 Rails查询速度,ruby-on-rails-3,Ruby On Rails 3,刚发现奇怪的行为: Model.includes(:another).all Model.includes(:another) 第一个比第二个快5倍,你能解释一下吗? 如何实现第一种方法的速度,但返回与Kaminari一起使用的关系实例?这可能只是虚拟的差异,只是在日志上。在Firebug中检查时,加载速度是相同的

刚发现奇怪的行为:

Model.includes(:another).all
Model.includes(:another)
第一个比第二个快5倍,你能解释一下吗?

如何实现第一种方法的速度,但返回与Kaminari一起使用的
关系
实例?

这可能只是虚拟的差异,只是在日志上。在Firebug中检查时,加载速度是相同的