 <p>There are some different matters in your question. First of all:</p> <p>1: I don't really understand what you do in your query, but the limit clause must be at the end of a query, so you could try </p> <pre><code>select * from A join B on A.id = B.id limit 10 </code></pre> <p>And this should work. More info on:</p> <p><a href="https://dev.mysql.com/doc/refman/5.0/en/select.html" rel="nofollow">https://dev.mysql.com/doc/refman/5.0/en/select.html</a></p> <p>2: Join vs. IN clause: the IN clause should always perform worse than the join. Imagine something like:</p> <pre><code>select * from A where A.id in (select id from B) </code></pre> <p>This will do a full scan on B table (<code>select id from B</code> subquery) and then another full scan on A to try match the results.</p> <p>However, </p> <pre><code>select * from A join B on A.id = B.id </code></pre> <p>should do a hash join between both tables, and if you have planned it right, id will be an index column, so it should be quite faster (and do no full scans on neither of them)</p>