Thanks for the reply.
At this point, I'm less worried about the join than the fact that I'm sending one query per record. If the select statement has already joined all the tables, is there a way to use SELECT... IN... to batch them so that I reduce the overall # of queries?
paulh wrote:
I'd start off with table-per-hierarchy (TBH) rather than table-per-class (TBC) - it doesn't really matter if the attributes are not shared amongst the subclasses, but it will dramatically cut down on the number of joins, which are expensive.
Taking your example, you would have a 30-table join using TBC as opposed to one using TBH. The only caveat is if your database engine actually reserves the space for all of the field, but most don't these days