Laravel Eloquent join vs with
问题 I see that join is (by default inner join) and its returning all columns but it takes almost the same time as with keyword for just 1000 data. $user->join(‘profiles’, ‘users.id’, ‘=’, ‘profiles.user_id’) - generates the below query. select * from `users` inner join `profiles` on `users`.`id` = `profiles`.`user_id` where `first_name` LIKE '%a%'` User::with(‘profile’) - this eager loading outputs the below query select * from `users` where exists (select * from `profiles` where `users`.`id` =