no. there is a table where b_sys_id is unique, but it is not part of the query right now. The idea is that the b_alt_id, is mostly unique, but it is not enforced by the database. The primary key of the B_XREF_TB is the combination of the two, B_SYS_ID, B_ALT_ID. I do have another index on the table that is the clustering index B_ALT_ID, B_SYS_ID as that is the way the table is most commonly queried.
My original thought when just the subselect was sent to me was to replace it with an exists clause, until I got the rest of the query and saw that it is the only indexable input. That section of the query on its own, runs in a respectable amount of time, .23 seconds elapsed.
Other pieces of info I should have sent earlier. The database is on Z/OS, DB2 V9. Query is dynamic from a workstation, using DB2 Connect gateway.
Dave Nance