I would recommend you to get rid of the cell nodes after each selection which will create an implict AND between the two selection nodes. The MATables are generated due to the cell nodes. The first cell node is generating the MATable which is uploaded into the database. If you are using cell nodes, MATables will be created and stored in the MATables library. To optimize the query performance, SAS loads the MATable in to the CI_TEMP (dbtmplib) schema on the database and they runs the query generated by the second select node. It is always recommened to have bulk load enabled for dbtmplib library. You are using ODBC which is lacking bulk load. I can see that you have SAS Access to SQL server, you should be using SAS/ACCESS to SQL server instead of ODBC for bulk load. The best way to improve the performance is to get rid of the cell node which would eliminate the upload. /Vijay
... View more