0
votes

I'm using a SAS access to oracle. and I want to see the query that SAS sends to Oracle.

assume that : oracle is the name of the oracle libname and local is the sas libname.

proc sql;
   select *
     from oracle.oracle_table ot
       inner join local.sas_table st
          on ot.customer_id = st.customer_id
;
quit;

I want to know if sas retrieves all data from the oracle table and then does the join or it's sending the list of the customer ids.

Thanks ! MK

1

1 Answers

5
votes

Use sastrace to see how it's coming over from Oracle, and _method to see how they are being joined.

options sastrace=',,,d' sastraceloc=saslog;
proc sql _method;
 select *
  from oracle.oracle_table ot
   inner join local.sas_table st
      on ot.customer_id = st.customer_id
;
quit;