|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|position|SELECT * FROM `geo_position`|1|302|302||0|0|10032984|10032984|10032984|10032984|
|tenant|SELECT * FROM `employee_tenant_user`|1|1|1||0|0|35828|35828|35828|35828|
|v4_user|SELECT * FROM `cwx_external_user`|1|38|38||0|0|5392226|5392226|5392226|5392226|
|qrcode_service|SELECT * FROM `qrcode_scan_log`|1|203|203||0|0|3849311|3849311|3849311|3849311|
|authorization_service|SELECT login_token FROM authorization_service.user_login_token WHERE user_id=? AND tenant_id=? AND tenant_wx_app_id=? ORDER BY id DESC LIMIT ?,?|1|1|1||0|0|1|1|1|1|
|v4_user|SELECT * FROM `member_change_log`|1|770|770||0|0|11290349|11290349|11290349|11290349|
|shop_work|SELECT * FROM `task_item`|1|73|73||0|0|1091587|1091587|1091587|1091587|
|sms|SELECT * FROM `sms_report`|1|989|989||0|0|10754403|10754403|10754403|10754403|
|shop_work|SELECT * FROM `work_report`|1|3|3||0|0|19290|19290|19290|19290|
|shop_work|SELECT * FROM `attached`|1|8|8||0|0|116545|116545|116545|116545|
|v4_user|SELECT t.tenant_id,t.tenant_app_id,t.registry_shop_id AS shopId,? AS statisticDate,t.source_type AS memberSource,count(*)amount FROM v4_user.member_source t WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.create_time>=? AND t.create_time<? GROUP BY t.tenant_id,t.tenant_app_id,t.registry_shop_id,t.source_type LIMIT ? OFFSET ?|1|2|2||0|0|288299|288299|48|48|
|tenant|SELECT * FROM `day_price`|1|1|1||0|0|33796|33796|33796|33796|
|v4_user|SELECT DATE_FORMAT(t?.create_time,?) AS statistic_date,DATE_FORMAT(t?.create_time,?) AS statistic_month,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.scene AS channleName,t?.template_id AS templateId,ct.coupon_name,? AS `status`,count(es.id) AS `order`,ifnull(sum(es.amount),?) AS dealAmount FROM v4_coupon.coupon t? JOIN v4_coupon.coupon_template ct ON t?.template_id=ct.id JOIN v4_coupon.coupon_write_off t? ON t?.id=t?.coupon_id AND t?.type=? JOIN v4_sales.erp_sales_detail esd ON esd.tenant_id=? AND convert(t?.id,char)=esd.product_barcode AND esd.sales_type=? JOIN v4_sales.erp_sales es ON es.tenant_id=? AND es.tenant_app_id=? AND es.sales_erp_id=esd.sales_erp_id AND t?.business_id=es.sales_erp_id AND es.sales_status IN(?) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? GROUP BY DATE_FORMAT(t?.create_time,?),DATE_FORMAT(t?.create_time,?),DATE_FORMAT(t?.create_time,?),t?.tenant_id,t?.tenant_app_id,t?.scene,t?.template_id,ct.coupon_name LIMIT ? OFFSET ?|1|1|1||0|0|0|0|0|0|
|account|SELECT od.id,od.tenant_id,od.tenant_wechatapp_id tenant_app_id,od.order_no,od.source,od.type,od.activity_id,od.activity_type,od.user_id,od.user_name,od.mobile_no,od.take_type,td.shop_id,td.shop_name,od.coupon_id,dt.product_id goods_id,dt.product_name goods_name,dt.art_no style_no,dt.sku_id,dt.spec,gs.barcode,od.product_fee,od.freight_fee,od.discount_fee,od.total_fee,od.payment_fee+od.offline_payment_fee payment_fee,od.status,od.finish_type,od.take_shop_id,od.take_shop_name,od.take_employee_user_id,od.take_employee_user_name,od.manager_shop_id,od.manager_shop_name,od.manager_user_id,od.manager_user_name,od.manager_mobile_no,od.manager_brokerage,od.create_time,od.update_time,? collect_time,dt.quantity FROM `order`.order_info od LEFT JOIN ORDER.order_detail dt ON od.id=dt.order_id LEFT JOIN deliver.trade_deliver td ON od.tenant_wechatapp_id=td.tenant_app_id AND od.id=td.trade_id LEFT JOIN goods.goods_sku gs ON dt.sku_id=gs.id WHERE od.tenant_wechatapp_id=? AND od.update_time>=? AND od.create_time<=? AND od.update_time<=? LIMIT ? OFFSET ?|1|1|1||0|0|1130|1130|274|274|
|v4_user|SELECT DATE_FORMAT(t?.sales_date,?) AS statistic_date,DATE_FORMAT(t?.sales_date,?) AS statistic_month,? AS statistic_version,DATE_FORMAT(t?.update_time,?) AS busi_date,? AS sale_status,t?.tenant_id,t?.tenant_app_id,ifnull(sp.id,?) AS shop_id,ifnull(emp.id,?) AS employee_id,?*count(*) AS sales_order,?*ifnull(sum(t?.amount),?) AS sales_amount,?*ifnull(sum(if(t?.member_erp_id=?,?,?)),?) AS no_sales_order,?*ifnull(sum(if(t?.member_erp_id=?,t?.amount,?)),?) AS no_sales_amount,?*ifnull(sum(if(t?.member_erp_id>? AND t?.member_status=?,?,?)),?) AS new_sales_order,?*ifnull(sum(if(t?.member_erp_id>? AND t?.member_status=?,t?.amount,?)),?) AS new_sales_amount FROM v4_sales.erp_sales t? JOIN v4_sales.erp_sales_extend? t? ON t?.tenant_id=t?.tenant_id AND t?.id=t?.id LEFT JOIN v4_employee.shop sp ON t?.tenant_id=sp.tenant_id AND t?.dept_erp_id=sp.dept_id LEFT JOIN tenant.employee emp ON t?.tenant_id=emp.tenant_id AND t?.employee_erp_id=emp.employee_erp_id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.update_time>=? AND t?.update_time<? AND t?.is_sales=? AND t?.sales_status=? GROUP BY t?.tenant_id,t?.tenant_app_id,sp.id,emp.id,DATE_FORMAT(t?.sales_date,?),DATE_FORMAT(t?.sales_date,?),DATE_FORMAT(t?.update_time,?) LIMIT ? OFFSET ?|1|1|1||0|0|3360|3360|10|10|
|v4_user|SELECT * FROM `potential_customer_maintain`|1|19|19||0|0|521421|521421|521421|521421|
|shop_work|SELECT * FROM `report_data_source`|1|8|8||0|0|57893|57893|57893|57893|
|v4_user|SELECT t.shop_id,t.shop_name,count(DISTINCT t.id) AS couponNum,ifnull(sum(es.amount_pay),?) AS saleAmount FROM v4_coupon.coupon_write_off t LEFT JOIN v4_sales.erp_sales_detail es ON es.tenant_id=? AND es.tenant_app_id=? AND t.business_id=es.sales_erp_id WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.shop_id>? AND t.create_time>=? AND t.create_time<? GROUP BY t.shop_id,t.shop_name|1|1|1||0|0|63|63|0|0|
|value_added|SELECT * FROM `value_added_user_extend`|1|13|13||0|0|2110158|2110158|2110158|2110158|
|tenant|SELECT * FROM `employee`|1|8|8||0|0|95170|95170|95170|95170|
|sms|SELECT * FROM `sms_send_extend`|1|77|77||0|0|3744705|3744705|3744705|3744705|
|sms|SELECT * FROM `sms_send`|1|965|965||0|0|9368658|9368658|9368658|9368658|
|account|SELECT min(create_time)create_time FROM coupon_service.template WHERE tenant_id=? AND tenant_app_id=?|1|2|2||0|0|22083|22083|1|1|
|tenant|SELECT * FROM `employee_shop`|1|2|2||0|0|93437|93437|93437|93437|
|employee|SELECT * FROM `backlog_detail`|1|6|6||0|0|1429463|1429463|1429463|1429463|
|v4_user|SELECT * FROM `reception_customer`|1|14|14||0|0|408789|408789|408789|408789|
|tenant|SELECT * FROM `erp_sales_back_?`|1|20|20||0|0|438960|438960|438960|438960|
|v4_user|SELECT * FROM `wx_user`|1|47|47||0|0|5285881|5285881|5285881|5285881|
|account|SELECT tm.id,tm.tenant_id,tm.tenant_app_id,tu.user_id AS external_user_id,? updateTime FROM corpwx.external_user tu INNER JOIN user_service.tenant_member_bind tm ON tu.tenant_id=tm.tenant_id AND tm.tenant_app_id=? AND tu.union_id=tm.wx_union_id WHERE tu.tenant_id=? AND tu.un_assign_flag=? AND tu.union_id IS NOT ? AND tu.create_time>=? AND tu.create_time<=? ORDER BY id LIMIT ? OFFSET ?|1|1|1||0|0|3364|3364|0|0|
|v4_employee|SELECT * FROM `task_task_attach`|1|7|7||0|0|1357877|1357877|1357877|1357877|
|shop_work|SELECT * FROM `manage_report`|1|1|1||0|0|662|662|662|662|
|account|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.coupon_id,ifnull(tb?.erp_member_id,?) AS giveMemberId,ifnull(tb.erp_member_id,?) AS receiveMemberId,t?.create_time AS receiveTime FROM coupon_service.user_coupon_give_record t? LEFT JOIN user_service.tenant_member_bind tb ON tb.tenant_id=t?.tenant_id AND tb.tenant_app_id=t?.tenant_app_id AND tb.user_id=t?.user_id AND tb.tenant_id=? LEFT JOIN user_service.tenant_member_bind tb? ON tb?.tenant_id=t?.tenant_id AND tb?.tenant_app_id=t?.tenant_app_id AND tb?.user_id=t?.give_user_id AND tb?.tenant_id=? WHERE t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<=? LIMIT ? OFFSET ?|1|1|1||0|0|52087|52087|0|0|
|v4_user|SELECT count(*) FROM v4_activity.lottery_log t WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.member_id=? AND t.create_time>=? AND t.create_time<DATE_ADD(?,INTERVAL ? day)|1|1|1||0|0|15278|15278|1|1|
|v4_user|SELECT * FROM `wx_user_subscribe_log`|1|17|17||0|0|4749888|4749888|4749888|4749888|
|tenant|SELECT * FROM `erp_employee`|1|5|5||0|0|88421|88421|88421|88421|
|shop_work|SELECT * FROM `task`|1|101|101||0|0|464505|464505|464505|464505|
|account|SELECT count(?) FROM tenant.erp_sales t? LEFT JOIN tenant.erp_sales_extend? ese ON t?.tenant_id=ese.tenant_id AND t?.tenant_wechatapp_id=ese.tenant_app_id AND t?.sales_erp_id=ese.sales_erp_id LEFT JOIN warranty_service.warranty t? ON t?.tenant_wechatapp_id=t?.tenant_wechatapp_id AND t?.sales_erp_id=t?.erp_sales_id AND t?.is_disable=? WHERE t?.tenant_id=? AND t?.tenant_wechatapp_id=? AND t?.sales_status=? AND t?.is_sales=? AND t?.dept_erp_id=? AND t?.sales_date>=date_format(?,?) AND t?.sales_date<=date_format(?,?)|1|2|2||0|0|4949|4949|1|1|
|v4_sales|SELECT * FROM `comment_detail`|1|1|1||0|0|342660|342660|342660|342660|
|account|SELECT esd.id,es.tenant_id,es.tenant_wechatapp_id AS tenantAppId,es.sales_erp_id,esd.sales_index,es.dept_erp_id,es.employee_erp_id,es.member_erp_id,es.sales_status,es.sales_date,esd.category_erp_id,ifnull(esde.sales_brand,?) AS sales_brand,ifnull(esde.sales_craft,?) AS sales_craft,esd.amount_total,esd.amount_pay,esd.quantity,round(esd.amount_pay/esd.quantity,?) AS amount_avg FROM tenant.erp_sales es JOIN tenant.erp_sales_detail esd ON es.tenant_id=esd.tenant_id AND es.tenant_wechatapp_id=esd.tenant_wechatapp_id AND es.sales_erp_id=esd.sales_erp_id AND esd.sales_type=? LEFT JOIN tenant.erp_sales_detail_extend esde ON esde.tenant_id=esd.tenant_id AND esde.tenant_wechatapp_id=esd.tenant_wechatapp_id AND esde.sales_erp_id=esd.sales_erp_id AND esde.sales_index=esd.sales_index WHERE es.tenant_id=? AND es.tenant_wechatapp_id=? AND es.update_time>=? AND es.update_time<=? AND es.sales_status IN(?) LIMIT ? OFFSET ?|1|1|1||0|0|0|0|0|0|
|account|SELECT es.sales_date,es.tenant_id,es.tenant_wechatapp_id tenant_app_id,es.dept_erp_id shop_id,es.employee_erp_id user_id,count(*)amount,sum(if(tu.id>?,?,?))register_amount FROM tenant.erp_sales es LEFT JOIN user_service.tenant_user tu ON es.tenant_id=tu.tenant_id AND es.tenant_wechatapp_id=tu.tenant_app_id AND es.member_erp_id=tu.erp_member_id WHERE es.tenant_id=? AND es.tenant_wechatapp_id=? AND es.sales_status=? AND es.is_sales=? AND es.create_time>=? AND es.create_time<=? GROUP BY es.tenant_id,es.tenant_wechatapp_id,es.sales_date,es.dept_erp_id,es.employee_erp_id|1|1|1||0|0|655|655|98|98|
|qrcode_service|SELECT * FROM `qrcode`|1|9|9||0|0|77553|77553|77553|77553|
|qrcode_login|SELECT * FROM `qrcode_log`|1|1|1||0|0|7998|7998|7998|7998|
|value_added|SELECT * FROM `value_added_user`|1|17|17||0|0|2112321|2112321|2112321|2112321|
|erp_sync|SELECT * FROM `cwx_checkin_sync_log`|1|11|11||0|0|264346|264346|264346|264346|
|account|SELECT pd.id product_id,? tenant_id,? tenant_wechatapp_id,pd.product_name,? product_type,pd.tag_price price,it.volume,it.id inventory_id,pd.create_time,? partner_id,? partner_name,pd.update_time FROM gift_mail.platform_product pd LEFT JOIN gift_mail.platform_inventory it ON pd.id=it.product_id LIMIT ? OFFSET ?|1|2|2||0|0|4366|4366|2183|2183|
|v4_user|SELECT * FROM `employee_external_bind`|1|41|41||0|0|7065975|7065975|7065975|7065975|
|account|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.sneak_guest_no,ifnull(tb.erp_member_id,?) AS memberId,(CASE t?.user_type WHEN ? THEN ? ELSE ? END) AS userType,ifnull(tm.user_name,ceu.nick_name) AS userName,tm.mobile_no,t?.create_employee_id,t?.create_shop_id,t?.create_time AS recordTime,t?.maintain_employee_id,t?.last_maintain_date,(CASE t?.`status` WHEN ? THEN ? ELSE ? END)`status`,t?.sales_erp_id,if(t?.`status`=?,t?.update_employee_id,?) AS failEmployeeId,(CASE fail_type WHEN ? THEN ? ELSE ? END) AS failType,t?.finish_date FROM tenant.sneak_guest t? LEFT JOIN user_service.tenant_member tm ON tm.tenant_id=? AND tm.tenant_app_id=t?.tenant_app_id AND tm.user_id=t?.user_id LEFT JOIN user_service.tenant_member_bind tb ON tb.tenant_id=? AND tb.id=tm.id LEFT JOIN corpwx.corpwx_external_user ceu ON t?.user_id=ceu.id LEFT JOIN tenant.sneak_guest_sales t? ON t?.tenant_id=t?.tenant_id AND t?.id=t?.sneak_guest_id LEFT JOIN tenant.erp_sales t? ON t?.tenant_id=t?.tenant_id AND t?.sales_id=t?.id AND t?.tenant_wechatapp_id=? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.update_time>=? AND t?.update_time<=? LIMIT ? OFFSET ?|1|1|1||0|0|2778|2778|463|463|
|sms|SELECT * FROM `sms_send_back`|1|1|1||0|0|16036|16036|16036|16036|
|account|SELECT od.tenant_id,od.tenant_wechatapp_id tenant_app_id,od.user_id,count(?)order_amount FROM `order`.order_info od WHERE od.tenant_wechatapp_id=? AND od.status IN (?) AND od.user_id IN (?) GROUP BY od.tenant_id,od.tenant_wechatapp_id,od.user_id|1|1|1||0|0|1232|1232|216|216|
|v4_user|SELECT * FROM `member_grade`|1|53|53||0|0|4081330|4081330|4081330|4081330|
|account|SELECT es.tenant_id,es.tenant_wechatapp_id tenant_app_id,es.sales_date,es.dept_erp_id,es.employee_erp_id erpEmployeeId,sd.category_erp_id,tu.id FROM tenant.erp_sales es LEFT JOIN tenant.erp_sales_detail sd ON es.tenant_id=sd.tenant_id AND es.tenant_wechatapp_id=sd.tenant_wechatapp_id AND es.sales_erp_id=sd.sales_erp_id LEFT JOIN user_service.tenant_user tu ON tu.tenant_id=es.tenant_id AND es.tenant_wechatapp_id=tu.tenant_app_id AND es.member_erp_id=tu.erp_member_id WHERE es.tenant_id=? AND es.tenant_wechatapp_id=? AND es.create_time>=? AND es.create_time<=? AND es.sales_status=? AND es.is_sales=? AND sd.sales_type=? ORDER BY es.id LIMIT ? OFFSET ?|1|1|1||0|0|1425|1425|414|414|
|score_player|SELECT * FROM `score_flow`|1|1|1||0|0|34499|34499|34499|34499|
|tenant|SELECT * FROM `employee_qrcode`|1|3|3||0|0|66969|66969|66969|66969|
