The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

balteo (12) [Avatar] Offline
#1
I have an interrogation about page 302 section 12.2.4:

            for (Item item : items) {
                assertTrue(item.getBids().size() > 0);
                // select * from BID where ITEM_ID in (
                //  select ID from ITEM
                // )
            }


My question is about the specific subselect i.e.
select ID from ITEM


Is this not going to return the whole ITEM table IDs?

If that is indeed the case, is it really an optimization to do so?