caishunfeng commented on code in PR #12506:
URL:
https://github.com/apache/dolphinscheduler/pull/12506#discussion_r1004075767
##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionLogMapper.xml:
##########
@@ -50,6 +50,16 @@
where code = #{code}
and version = #{version}
</select>
+ <select id="queryByDefinitionCodesAndVersion"
resultType="org.apache.dolphinscheduler.dao.entity.ProcessDefinitionLog"
+
parameterType="org.apache.dolphinscheduler.dao.entity.ProcessInstance">
+ select
+ <include refid="baseSql"/>
+ from t_ds_process_definition_log
+ where
+ <foreach collection="processInstances" item="item" separator="or">
Review Comment:
It should avoid the use `or` in query, because it will miss the index and
query slowly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]