chen877511127 opened a new issue, #15448:
URL: https://github.com/apache/dolphinscheduler/issues/15448

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   When t_ds_process_instance table data reaches 300000,Project management list 
query takes 10 seconds
   
   ### What you expected to happen
   
           select
           <include refid="baseSqlV2">
               <property name="alias" value="p"/>
           </include>
           ,
           u.user_name as user_name,
           (SELECT COUNT(*) FROM t_ds_process_definition AS def WHERE 
def.project_code = p.code) AS def_count,
           (SELECT COUNT(*) FROM t_ds_process_definition_log def, 
t_ds_process_instance inst WHERE def.code =
           inst.process_definition_code and def.version = 
inst.process_definition_version AND def.project_code = p.code
           AND inst.state=1 ) as inst_running_count
           from t_ds_project p
           left join t_ds_user u on u.id=p.user_id
           where 1=1
   
   ### How to reproduce
   
   When t_ds_process_instance table data reaches 300000
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   3.1.x
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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