我正在配置单元上运行以下查询,但是这花费了太多时间,
create table if not exists padl.fraude_inter_med_base_xdr as
select xdr.cllng_number,xdr.called_number,xdr.call_duration, from_unixtime(unix_timestamp(xdr.time_stop,'yyyyMMddHHmmss'),'yyyy-MM-dd HH:mm:ss') as Fecha,
pp.pais as pais, pp.prefijo as prefijo
from padl.fraude_vozm_xdr xdr
left join padl.fraude_inter_med_alarmas_xdr_hist hist
on xdr.cllng_number=hist.cllng_number
and xdr.called_number=hist.called_number
and from_unixtime(unix_timestamp(xdr.time_stop,'yyyyMMddHHmmss'),'yyyy-MM-dd HH:mm:ss')=hist.fecha, padl.fraude_prefijos_paises pp, oper.tbda_parametros par
where par.nombre='fradinter_ventana_tiempo' and
par.hist_usuario='fradinter' and
xdr.cllng_number like concat('009','%') and
(unix_timestamp('2018-06-22 00:14:18','yyyy-MM-dd HH:mm:ss') - unix_timestamp(xdr.time_stop,'yyyyMMddHHmmss'))<= 7200 and
hist.cllng_number is null and
hist.called_number is null and
hist.fecha is null
;
padl.fraude_vozm_xdr表具有1.596.643.239条记录
我已经尝试对其进行优化,但是没有成功。