1.查询的SQL
结果:
结果:
结果:
结果:
select count(subie.user_id) as count
from sum_user_basic_info_exp subie
join sum_user_lend_info_exp sulie
on sulie.user_id=subie.user_id
where subie.curr_user_role_cd='1'
and subie.reg_dt >='2016-08-29'
and subie.reg_dt <='2016-08-29'
结果:
mycat1 mycat2 memsql1 memsql2
2.24s 2.25s 0.67s 0.05s
2.查询的SQL
select count(subie.user_id) as count
from sum_user_basic_info_exp subie
join sum_user_lend_info_exp sulie
on sulie.user_id=subie.user_id
join sum_mk_coupon_info_exp smcie
on smcie.user_id=subie.user_id
and smcie.rcv_dt>='2016-08-20'
and smcie.coupon_status_cd in ('1','2','4')
结果:
mycat1 mycat2 memsql1 memsql2
6.63s 9.49s 1s 0.04s
3.查询的SQL
select count(subie.user_id) as count
from sum_user_basic_info_exp subie
join sum_user_lend_info_exp sulie
on sulie.user_id=subie.user_id
join sum_mk_coupon_info_exp smcie
on smcie.user_id=subie.user_id
and smcie.rcv_dt>='2016-08-20'
and smcie.coupon_status_cd in ('1','2','4')
join fct_ld_lender_finances fllf
on fllf.user_id=subie.user_id
and fllf.fin_status_cd in ('4','9')
and fllf.is_renew=1
join ld_lend_by_lend_tm_stat llblts
on llblts.user_id=subie.user_id
and llblts.lend_tm>='2016-08-20'
where subie.curr_user_role_cd='1'
and sulie.bind_wx_dt is not null
and subie.reg_dt >='2016-08-29'
and subie.reg_dt <='2016-08-29'
结果:
4.查询的SQL
select platform_reg_chnl_cd,count(subie.user_id) as count
from sum_user_basic_info_exp subie
join sum_user_lend_info_exp sulie
on sulie.user_id=subie.user_id
join fct_ld_lender_finances fllf
on fllf.user_id=subie.user_id
and fllf.fin_status_cd in ('4','9')
and fllf.is_renew=1
join ld_lend_by_lend_tm_stat llblts
on llblts.user_id=subie.user_id
and llblts.lend_tm>='2016-07-20'
where subie.curr_user_role_cd='1'
and sulie.bind_wx_dt is not null
and subie.reg_dt >='2016-07-29'
and subie.reg_dt <='2016-08-29'
group by platform_reg_chnl_cd
order by platform_reg_chnl_cd;
结果:
、
5.查询的SQL
select platform_reg_chnl_cd,count(subie.user_id) as count
from sum_user_basic_info_exp subie
join sum_user_lend_info_exp sulie
on sulie.user_id=subie.user_id
join sum_mk_coupon_info_exp smcie
on smcie.user_id=subie.user_id
and smcie.rcv_dt>='2016-08-10'
and smcie.coupon_status_cd in ('1','2','3')
group by platform_reg_chnl_cd
order by platform_reg_chnl_cd;
结果:
mycat1 mycat2 memsql1 memsql2
6.89s 7.06s 0.08s 0.06s