Skip to content

Commit

Permalink
xuxueli#2234 SQL慢查询脚本问题
Browse files Browse the repository at this point in the history
  • Loading branch information
liufei committed Feb 7, 2021
1 parent 3b4067a commit b7a1a52
Showing 1 changed file with 10 additions and 9 deletions.
Expand Up @@ -247,15 +247,16 @@
</update>

<select id="findLostJobIds" resultType="long" >
SELECT t.id
FROM xxl_job_log AS t
WHERE t.trigger_code = 200
and t.handle_code = 0
and t.trigger_time <![CDATA[ <= ]]> #{losedTime}
and t.executor_address not in (
SELECT t2.registry_value
FROM xxl_job_registry AS t2
)
SELECT
t.id
FROM
xxl_job_log t
LEFT JOIN xxl_job_registry t2 ON t.executor_address = t2.registry_value
WHERE
t.trigger_code = 200
AND t.handle_code = 0
AND t.trigger_time <![CDATA[ <= ]]> #{losedTime}
AND t2.id IS NULL;
</select>

</mapper>

0 comments on commit b7a1a52

Please sign in to comment.