Querying the details for each master takes a lot of time, because for each
master record, a separate query is issued to load the detail records.
It might be possible to issue one big query that returns the detail records for
*all* masters (using the master query condition to select only the details for
thos masters that also have been selected) and split the result of that single
query into separate ResultSet objects, one per master record.
|