it performs the same function in the 2 queries I wrote below, but which one should be preferred in terms of performance, can you please answer by explaining a reason.
Option 1
$user= DB::getRow('SELECT * FROM users WHERE id=1');
if($user){
$cv= DB::getRow('SELECT * FROM cvs WHERE userid=?',array($user->id));
}
Option 2
$user= DB::getRow('SELECT users.id,cvs.userid FROM users inner join cvs ON cvs.userid= users.id WHERE id=1');
Thanks in advance for the help