(select /*+ FIRST_ROWS*/
distinct RTID, A.STNID, A.FCLTKEY , A.ORD, A.USEYN ,decode(B.prjstep,'5','5','0')as prjstep --참조
from bibit.TN_FACILITY b, bibit.TH_FACILITY_ROUTE_MAPNG a
where (a.rtid, a.stnid,a.updatedt) in
(select rtid, stnid, max(updatedt)
from bibit.TH_FACILITY_ROUTE_MAPNG
where updatedt <= to_char(sysdate-1,'yyyymmddhh')
and a.fcltkey=b.fcltkey
AND SUBSTR(FCLTKEY,1,3) = 'BIT'
group by rtid, stnid))
이 쿼리를 빠르게 데이터 수집하는방법은없나요?
너무 늦게 데이터가 나옵니다