Browse Source

[Improvement] SQL optimization queryTheHighestPriorityTasks (#13671)

Co-authored-by: chenjiaming <chenjiaming@kezaihui.com>
3.2.0-release
陈家名 2 years ago committed by GitHub
parent
commit
c2d5774790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskGroupQueueMapper.xml

6
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskGroupQueueMapper.xml

@ -112,9 +112,9 @@
select
<include refid="baseSql" />
from t_ds_task_group_queue
where priority = (select max(priority) from t_ds_task_group_queue where group_id = #{groupId}
and status = #{status} and in_queue = #{inQueue} and force_start = #{forceStart} ) and group_id = #{groupId}
and status = #{status} and in_queue = #{inQueue} and force_start = #{forceStart} limit 1
where group_id = #{groupId} and status = #{status} and in_queue = #{inQueue} and force_start = #{forceStart}
order by priority desc
limit 1
</select>
<select id="queryByTaskId" resultType="org.apache.dolphinscheduler.dao.entity.TaskGroupQueue">

Loading…
Cancel
Save