모든 답장을 보내 주셔서 감사합니다. 여기
는 MySQL의 쿼리 로그의 결과이다 :
기구 :: 모든(); - 1.6772060394287 초
130710 9:52:43 5 Connect [email protected] 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 :: 표 ('t_organisations') -> (GET); - 0.13963603973389 초
130710 9:55:16 6 Connect [email protected] 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
그래서 설득력 PHP 코드에 거짓말을해야하는 지연을 의미가 다음 차이가 없습니다 .... 예, xdebug가 설치되어 있고 아무런 이유없이 느려지는 것을 알아 내려고 노력하는 시간을 낭비 할 준비가되어 있지 않습니다 !!! 쿼리 빌더가 빠르면 나에게 충분하다 !!
@Laravels '개발자 : 프레임 워크에서 훌륭하게 작동합니다. 직관적이며 권한 부여를 잘 처리합니다. 특히 Leroy Merlin의 신임 및 위임 플러그인이 좋습니다. 당신은 Eloquent performance issue를 보길 원할 것입니다 !!
건배! 크레이그
개인적으로 시간 낭비가있는 곳을보기 위해 XDebug를 실행했습니다. –
모델에 정의 된 관계가 있습니까? 그렇다면 Eloquent는 많은 조인을해야 할 것입니다 ... – Laurence
대용량 데이터를 처리 할 때 특히 Query Builder를 사용하는 것이 가장 좋습니다. – crynobone