我在Rails中的动作很慢。视图/活动记录和sphinx都报告快速渲染,但整体操作大约需要1.2秒。一点也不好。我想知道是否可能是因为我正在将一个大的活动记录集转换为JSON。这是我的日志输出
Started GET "/genres/popular?page=2&per_page=10" for 127.0.0.1 at 2011-05-17 17:53:04 +1000
[Barista] Compiling all scripts for barista
[Barista] Compiling all coffeescripts
Processing by GenresController#popular as JSON
Parameters: {"page"=>"2", "per_page"=>"10"}
Genre Load (0.5ms) SELECT `genres`.* FROM `genres` ORDER BY medias_count DESC LIMIT 10 OFFSET 10
SQL (0.3ms) SELECT COUNT(*) FROM `genres`
Media Load (2.2ms) SELECT `medias`.* FROM `medias` WHERE (`medias`.genre_id = 209)
Genre Load (0.2ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
MediaType Load (0.2ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 209) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
Media Load (3.7ms) SELECT `medias`.* FROM `medias` WHERE (`medias`.genre_id = 14)
Genre Load (0.3ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 14) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
Media Load (2.0ms) SELECT `medias`.* FROM `medias` WHERE (`medias`.genre_id = 286)
Genre Load (0.3ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 286) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
Media Load (2.0ms) SELECT `medias`.* FROM `medias` WHERE (`medias`.genre_id = 264)
Genre Load (0.3ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 264) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
Media Load (2.0ms) SELECT `medias`.* FROM `medias` WHERE (`medias`.genre_id = 270)
Genre Load (0.3ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 270) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 270) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 270) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 270) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 270) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 270) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 270) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 270) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 270) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 270) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
Media Load (2.0ms) SELECT `medias`.* FROM `medias` WHERE (`medias`.genre_id = 271)
Genre Load (0.3ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 271) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 271) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 271) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 271) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 271) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 271) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 271) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 271) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 271) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 271) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
Media Load (2.1ms) SELECT `medias`.* FROM `medias` WHERE (`medias`.genre_id = 36)
Genre Load (0.4ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 36) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 36) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 36) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 36) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 36) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 36) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 36) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 36) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 36) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 36) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
Media Load (2.1ms) SELECT `medias`.* FROM `medias` WHERE (`medias`.genre_id = 58)
Genre Load (0.4ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 58) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 58) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 58) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 58) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 58) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 58) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 58) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 58) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 58) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 58) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
Media Load (2.2ms) SELECT `medias`.* FROM `medias` WHERE (`medias`.genre_id = 186)
Genre Load (0.4ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 186) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 186) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 186) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 186) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 186) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 186) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 186) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 186) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 186) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 186) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
Media Load (3.4ms) SELECT `medias`.* FROM `medias` WHERE (`medias`.genre_id = 10)
Genre Load (0.3ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 10) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 10) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 10) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 10) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 10) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 10) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 10) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 10) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
CACHE (0.0ms) SELECT `genres`.* FROM `genres` WHERE (`genres`.`id` = 10) LIMIT 1
CACHE (0.0ms) SELECT `media_types`.* FROM `media_types` WHERE (`media_types`.`id` = 1) LIMIT 1
Completed 200 OK in 1262ms (Views: 209.9ms | ActiveRecord: 28.2ms | Sphinx: 0.0ms)
答案 0 :(得分:0)
是的,我只需要加载媒体。 Rails 101。