Comment
Comment by dragonwriter
What's wrong is replacing a single query with a join with multiple round trips implementing part of the join logic in application code because you are using an RDBMS as if it were a fairly dumb repository of dusconnected tables.
Is fine, if what your app wants is the ids from table1. Its not good if it is just a prelude to:
instead of just doing: