|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|statistic|select mb.tenant_id , mb.tenant_app_id , ifnull ( mt.shop_id , -1 ) shop_id , sum ( if ( mb.subscribe_flag = 1 , 0 , 1 ) ) cancel_amount , sum ( if ( mb.subscribe_flag = 1 , 1 , 0 ) ) subscribe_amount , sum ( if ( mb.bind_flag = 1 , 1 , 0 ) ) bind_amount , sum ( if ( mb.full_flag = 1 , 1 , 0 ) ) full_amount from member mb inner join member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mb.tenant_id , mb.tenant_app_id , mt.shop_id|73|10159|468||0|0|50863486|984016|3351|87|
|statistic|select mt.tenant_id , mt.tenant_app_id , ifnull ( mt.shop_id , -1 ) shop_id , ifnull ( mt.grade_erp_id , -1 ) grade_erp_id , count ( * ) amount from member mb inner join member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mt.tenant_id , mt.tenant_app_id , mt.shop_id , mt.grade_erp_id|69|10270|355||0|0|48164514|984640|14950|399|
|statistic|select mb.tenant_id , mb.tenant_app_id , ifnull ( mt.shop_id , -1 ) shop_id , ifnull ( mb.source_type , 'unknow' ) source_type , count ( * ) amount from member mb inner join member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mb.tenant_id , mb.tenant_app_id , mt.shop_id , mb.source_type|68|9639|452||0|0|46294176|984394|10518|276|
|statistic|select mt.tenant_id , mt.tenant_app_id , ifnull ( mt.shop_id , -1 ) shop_id , ifnull ( mt.employee_user_id , -1 ) employee_user_id , count ( * ) amount from member mb inner join member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mt.tenant_id , mt.tenant_app_id , mt.shop_id , mt.employee_user_id|62|9029|441||0|0|43020568|984350|41115|1421|
|statistic|select mb.tenant_id , mb.tenant_app_id , ifnull ( mt.shop_id , -1 ) shop_id , ifnull ( mt.employee_user_id , -1 ) user_id , count ( * ) service_amount , sum ( if ( mb.external_user_id is not null , 1 , 0 ) ) corp_amount , sum ( ifnull ( mt.member_image_flag , 0 ) ) image_amount from statistic.member mb inner join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mb.tenant_id , mb.tenant_app_id , mt.shop_id , mt.employee_user_id|55|7217|340||0|0|37459006|984350|36241|1420|
|tag_service|select l.id , l.`name` , count ( * ) as membernum from statistic.member r join statistic.member_extra t on t.id = r.id join tag_service.member_label_match m on r.id = m.id and m.match_label > :1 join tag_service.member_label l on l.tenant_app_id in ( :2 , :3 ) and l.deleted = :4 and ( ( m.match_label > > ( l.sort_index-1 ) ) & :5 ) = :6 where r.tenant_app_id = :7 and t.tenant_app_id = :8 group by l.id , l.`name`|28|8031|614||0|0|81756140|4768301|168|6|
|tag_service|select count ( 1 ) from ( select t1.user_id , t1.user_name , t1.sex , t1.mobile_no , t1.age , t1.source_type as membersource , t1.subscribe_flag as subscribestatus , t1.full_flag as fullstatus , t2.grade_erp_id as gradeerp , t2.sales_balance as totalconsumemoney , t2.consumption_integral as totalconsumepoint , t2.cumulation as totalpoint , t2.balance as pointbalance , t2.sales_amount as consumenum , t2.follow_time as subscribetime , t2.cancel_follow_time as cancelsubscribetime , date_format ( t1.birthday , '%y-%m-%d' ) as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , date_format ( t1.memorial_day , '%y-%m-%d' ) as memorialday , ifnull ( t1.memorial_day_is_lunar , 0 ) as memorialdayislunar , ifnull ( t1.memorial_name , '' ) as memorialname , t2.first_shop_time as firstentershoptime , t2.last_shop_time as lastentershoptime , t2.first_sales_time as firstconsumetime , t2.last_sales_time as latestconsumetime , t2.last_login_time as lastaccesstime , t2.last_service_time as lastservicetime , t2.last_score_time as lastscoretime , t2.registe_time as registertime , t2.category_name as categoryname , ( case when ifnull ( t1.partner_id , 0 ) > 0 then '联盟商家' when ifnull ( t1.agency_id , 0 ) > 0 then '钻石大使' else '会员' end ) as `identity` , ( case when t1.external_user_id is not null and t1.register_flag = :1 then :2 when t1.subscribe_flag = :3 and t1.register_flag = :4 then :5 else :6 end ) as `memberstate` , ifnull ( emp.employee_name , :7 ) as employeename , ifnull ( dept.shop_name , :8 ) as shopname , t1.tenant_app_open_id , t2.service_amount , ifnull ( t3.match_label , :9 ) as labelmatch from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.meta_erp_employee emp on t2.tenant_app_id = emp.tenant_app_id and t2.shop_id = emp.dept_erp_id and t2.employee_user_id = emp.employee_erp_id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.dept_erp_id left join tag_service.member_label_match t3 on t1.id = t3.id where t1.tenant_app_id = :10 and t2.tenant_app_id = :11 ) total|6|704|144||0|0|6810000|1135000|6|1|
|tag_service|select count ( 1 ) from ( select t1.user_id , t1.user_name , t1.sex , t1.mobile_no , t1.age , t1.source_type as membersource , t1.subscribe_flag as subscribestatus , t1.full_flag as fullstatus , t2.grade_erp_id as gradeerp , t2.sales_balance as totalconsumemoney , t2.consumption_integral as totalconsumepoint , t2.cumulation as totalpoint , t2.balance as pointbalance , t2.sales_amount as consumenum , t2.follow_time as subscribetime , t2.cancel_follow_time as cancelsubscribetime , date_format ( t1.birthday , '%y-%m-%d' ) as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , date_format ( t1.memorial_day , '%y-%m-%d' ) as memorialday , ifnull ( t1.memorial_day_is_lunar , 0 ) as memorialdayislunar , ifnull ( t1.memorial_name , '' ) as memorialname , t2.first_shop_time as firstentershoptime , t2.last_shop_time as lastentershoptime , t2.first_sales_time as firstconsumetime , t2.last_sales_time as latestconsumetime , t2.last_login_time as lastaccesstime , t2.last_service_time as lastservicetime , t2.last_score_time as lastscoretime , t2.registe_time as registertime , t2.category_name as categoryname , ( case when ifnull ( t1.partner_id , 0 ) > 0 then '联盟商家' when ifnull ( t1.agency_id , 0 ) > 0 then '钻石大使' else '会员' end ) as `identity` , ( case when t1.external_user_id is not null and t1.register_flag = :1 then :2 when t1.subscribe_flag = :3 and t1.register_flag = :4 then :5 else :6 end ) as `memberstate` , ifnull ( emp.employee_name , :7 ) as employeename , ifnull ( dept.shop_name , :8 ) as shopname , t1.tenant_app_open_id , t2.service_amount , ifnull ( t3.match_label , :9 ) as labelmatch from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.meta_erp_employee emp on t2.tenant_app_id = emp.tenant_app_id and t2.shop_id = emp.dept_erp_id and t2.employee_user_id = emp.employee_erp_id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.dept_erp_id left join tag_service.member_label_match t3 on t1.id = t3.id where t1.tenant_app_id = :10 and t2.tenant_app_id = :11 and t3.match_label > :12 and t3.match_label & :13 = :14 ) total|5|554|126||0|0|3405485|681673|5|1|
|tag_service|select count ( 1 ) from ( select t1.user_id , t1.user_name , t1.sex , t1.mobile_no , t1.age , t1.source_type as membersource , t1.subscribe_flag as subscribestatus , t1.full_flag as fullstatus , t2.grade_erp_id as gradeerp , t2.sales_balance as totalconsumemoney , t2.consumption_integral as totalconsumepoint , t2.cumulation as totalpoint , t2.balance as pointbalance , t2.sales_amount as consumenum , t2.follow_time as subscribetime , t2.cancel_follow_time as cancelsubscribetime , date_format ( t1.birthday , '%y-%m-%d' ) as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , date_format ( t1.memorial_day , '%y-%m-%d' ) as memorialday , ifnull ( t1.memorial_day_is_lunar , 0 ) as memorialdayislunar , ifnull ( t1.memorial_name , '' ) as memorialname , t2.first_shop_time as firstentershoptime , t2.last_shop_time as lastentershoptime , t2.first_sales_time as firstconsumetime , t2.last_sales_time as latestconsumetime , t2.last_login_time as lastaccesstime , t2.last_service_time as lastservicetime , t2.last_score_time as lastscoretime , t2.registe_time as registertime , t2.category_name as categoryname , ( case when ifnull ( t1.partner_id , 0 ) > 0 then '联盟商家' when ifnull ( t1.agency_id , 0 ) > 0 then '钻石大使' else '会员' end ) as `identity` , ( case when t1.external_user_id is not null and t1.register_flag = :1 then :2 when t1.subscribe_flag = :3 and t1.register_flag = :4 then :5 else :6 end ) as `memberstate` , ifnull ( emp.employee_name , :7 ) as employeename , ifnull ( dept.shop_name , :8 ) as shopname , t1.tenant_app_open_id , t2.service_amount , ifnull ( t3.match_label , :9 ) as labelmatch from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.meta_erp_employee emp on t2.tenant_app_id = emp.tenant_app_id and t2.shop_id = emp.dept_erp_id and t2.employee_user_id = emp.employee_erp_id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.dept_erp_id left join tag_service.member_label_match t3 on t1.id = t3.id where t1.tenant_app_id = :10 and t2.tenant_app_id = :11 and t3.match_label = :12 ) total|4|431|115||0|0|4488228|1122057|4|1|
|statistic|delete from statistic.batch_job_execution where job_execution_id <= :1|1|107|107||0|0|732936|732936|0|0|
|tag_service|select 0 as id , '未打标用户' as `name` , '' as markway , count ( * ) as membernum from statistic.member r join statistic.member_extra t on t.id = r.id join tag_service.member_label_match m on r.id = m.id and m.match_label = :1 where r.tenant_app_id = :2 and t.tenant_app_id = :3|1|102|102||0|0|680953|680953|1|1|
|statistic|select tenant_id , tenant_app_id , ifnull ( shop_id , -1 ) shop_id , sum ( if ( tenant_app_open_id is null and external_user_id is null , :1 , :2 ) ) normal_amount , sum ( if ( tenant_app_open_id is not null and external_user_id is null , :3 , :4 ) ) app_amount , sum ( if ( external_user_id is not null , :5 , :6 ) ) corp_amount from member where tenant_app_id = :7 and create_time <= :8 and register_flag = :9 group by tenant_id , tenant_app_id , shop_id|1|112|112||0|0|491825|491825|87|87|
|statistic|delete from statistic.batch_job_execution_params where job_execution_id <= :1|1|272|272||0|0|4292390|4292390|0|0|
|tag_service|select * from `member_label_match`|1|381|381||0|0|8661780|8661780|8661780|8661780|
