NutzCN Logo
问答 nutz dao再执行某个sql时很慢,但是在sql工具中把该sql拿出来执行很快,记录数就几条
发布于 2481天前 作者 qq_a42f26f3 1948 次浏览 复制 上一个帖子 下一个帖子
标签:

[2018-02-05 16:56:53,370][main]org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388)SELECT CONCAT('reg_act1_',a.member_id) AS outIntegralTxid, 'act' AS platCode, a.member_id AS memberId, 500 AS tradeIntegral, now() AS tradeDate, '注册送积分' as remark, '注册送积分' as decript, 'pc' AS source FROM crm_member a join crm_member_merge b on a.member_id=b.member_id and b.channel_sys='erp' join h5_lottery_act c on c.act_id=1 and a.regist_time>UNIX_TIMESTAMP(c.start_time)*1000 and a.regist_time<UNIX_TIMESTAMP(c.end_time)*1000 WHERE 1=1 and CONCAT('reg_act1_',a.member_id) not in( select s.out_integral_txid from mc_integral_change_log s where s.out_integral_txid is not null ) LIMIT 0, 1000

SELECT   CONCAT('reg_act1_',a.member_id) AS outIntegralTxid,   'act' AS platCode,   a.member_id AS memberId,   500 AS tradeIntegral,   now() AS tradeDate,   '注册送积分' as remark,   '注册送积分' as decript,   'pc' AS source  FROM   crm_member a   join crm_member_merge b on a.member_id=b.member_id and b.channel_sys='erp'   join h5_lottery_act c on c.act_id=1 and a.regist_time>UNIX_TIMESTAMP(c.start_time)*1000    and a.regist_time<UNIX_TIMESTAMP(c.end_time)*1000  WHERE   1=1 and CONCAT('reg_act1_',a.member_id) not in(  select s.out_integral_txid from mc_integral_change_log s where s.out_integral_txid is not null  ) LIMIT 0, 1000

这段放sql工具中执行很快,mysql数据库

1 回复

放sql工具中执行很快是因为查询缓存吧

添加回复
请先登陆
回到顶部