感谢你的回复。
这是mysql查询日志的结果:
组织::all(); - 1.6772060394287 秒
130710 9:52:43 5 Connect seltec@localhost on seltec
5 Prepare set names 'utf8' collate 'utf8_unicode_ci'
5 Execute set names 'utf8' collate 'utf8_unicode_ci'
5 Close stmt
5 Prepare select * from `users` where `id` = ? limit 1
5 Execute select * from `users` where `id` = '2' limit 1
5 Close stmt
5 Prepare select * from `t_organisations`
5 Execute select * from `t_organisations`
130710 9:52:44 5 Close stmt
130710 9:52:45 5 Quit
DB::table('t_organisations')->get(); - 0.13963603973389 秒
130710 9:55:16 6 Connect seltec@localhost on seltec
6 Prepare set names 'utf8' collate 'utf8_unicode_ci'
6 Execute set names 'utf8' collate 'utf8_unicode_ci'
6 Close stmt
6 Prepare select * from `users` where `id` = ? limit 1
6 Execute select * from `users` where `id` = '2' limit 1
6 Close stmt
6 Prepare select * from `t_organisations`
6 Execute select * from `t_organisations`
6 Close stmt
6 Quit
所以没有区别......这意味着延迟必须存在于 Eloquent php 代码中。是的,我安装了 xdebug,不,我不准备浪费我的时间来弄清楚为什么它很慢!!!如果它在查询生成器中更快,那对我来说已经足够了!!
@Laravels 的开发人员:在框架上做得很好。它很直观,可以很好地处理授权,尤其是 Leroy Merlin 的 confide 和 entrust 插件。不过,您可能想看看 Eloquent 性能问题!!
干杯! 克雷格