我想从oracle里取数据,因为慢,加了一个hint,可是proc sql自动把这个hint当作注释了
这样sql就很慢
如何保留hint呢
%MACRO PULL_TRX(dns=cancelled_tmp, ext=0, lag=&reconcile_window);
PROC SQL;
CONNECT TO ORACLE AS CC_TRX (USER=&username
PASSWORD=&password
PATH=&path
/*SCHEMA=&schema*/);
CREATE TABLE &dns AS
SELECT * FROM CONNECTION TO CC_TRX
(select /*+ index(b, RESP_IDX_&ext)*/site_id, client_id
from trx_&ext a,resp_&ext b
where a.creation_date>=(trunc((trunc(sysdate,'mm')-1),'mm'))
and a.creation_date<(trunc(sysdate,'mm'))
and trx_type_id=4
and a.id=b.id
and a.cking_id=b.cking_id
group by to_char(a.creation_date,'YYYY'),
to_char(a.creation_date,'MM'),site_id,client_id,decode(b.amount,0,'Zero','Non-Zero'),response);
QUIT;
%MEND;
解析后就没有hint了 :(