Skip to content

Commit

Permalink
Merge pull request #2247 from farboys/Fix_issues_2234
Browse files Browse the repository at this point in the history
#2234 SQL慢查询脚本问题
  • Loading branch information
xuxueli committed Feb 9, 2021
2 parents f2db281 + b7a1a52 commit b7be4ea
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 b7be4ea

Please sign in to comment.