Sub query select statment vs inner join
<p>I'm confused about these two statements who's faster and more common to use and best for memory</p>

<pre><code>select p.id, p.name, w.id, w.name 
from person p 
inner join work w on w.id = p.wid 
where p.id in (somenumbers)
vs

select p.id, p.name, (select id from work where id=p.wid) , (select name from work where id=p.wid)
from person p 
where p.id in (somenumbers)
</code></pre>

<p>The whole idea of this is that if I have I huge database  and I want to make inner join it will take memory and less performance to johin work table and person table but the sub query select statments it will only select one statment at the time so which is the best here</p>