ruanwenjun commented on code in PR #13273:
URL: 
https://github.com/apache/dolphinscheduler/pull/13273#discussion_r1057643331


##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml:
##########
@@ -178,14 +178,13 @@
         select t.state, count(0) as count
         from t_ds_process_instance t
         join t_ds_process_definition d on d.code=t.process_definition_code
-        join t_ds_project p on p.code=d.project_code
-        where 1 = 1
-        and t.is_sub_process = 0
+        where t.is_sub_process = 0

Review Comment:
   > @hiSandog @Radeity What about adding a foreign key in 
`t_ds_process_definition_code` referencing `project code` in `t_ds_project`?
   
   We don't need to add foreign key, the correct way is to add project code and 
project name in workflow instance, then we don't need to join the project table 
and workflow definition table in workflow instance listing page. 



-- 
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]

Reply via email to