Proxy tables just seem to not like me. This query is full pass thru. If I run it on sql server, it completes in less than a second with three results. For some reason running it through SQLA as a proxy table takes forever. I can query top 1 from this table via SQLA and it returns right away. I. 02/08 10:40:44. The query is being processed in FULL PASSTHRU mode I. 02/08 10:40:44. The Original Statement is I. 02/08 10:40:44. select M_Reject.Unique_ID from M_Reject where(M_Reject.RX_Number = '1234567') and(M_Reject.Dispenser_ID = '27845') and(M_Reject.Claimant_ID = '0') and(M_Reject.Service_ID = '0') and(M_Reject.New_Refill_Code = '0') and(M_Reject.Status = '1') order by M_Reject.UNIQUE_ID desc I. 02/08 10:40:44. The Virtual Statement is I. 02/08 10:40:44. select vt_1.expr_1 from vt_1 I. 02/08 10:40:44. The Remote Statement for vt_1 is I. 02/08 10:40:44. select M_Reject.Unique_ID from M_Reject where(M_Reject.RX_Number = '1234567') and(M_Reject.Dispenser_ID = '27845') and(M_Reject.Claimant_ID = '0') and(M_Reject.Service_ID = '0') and(M_Reject.New_Refill_Code = '0') and(M_Reject.Status = '1') order by M_Reject.UNIQUE_ID desc I. 02/08 10:40:44. Execute (testdb): I. 02/08 10:40:44. SELECT t1.Unique_ID FROM testdb.CLAIMS.M_Reject t1 WHERE t1.Status = '1' AND t1.New_Refill_Code = '0' AND t1.Service_ID = '0' AND t1.Claimant_ID = '0' AND t1.Dispenser_ID = '27845' AND t1.RX_Number = '1234567' ORDER BY t1.Unique_ID DESC This takes 13 minutes to complete. The original query is sent to SQL Server (verified via a sql trace - Im confident the issue is not on sql server as copying and pasting the query into Sql Management Studio runs as expected - right away). Any thoughts? |