github-actions[bot] commented on issue #9937: URL: https://github.com/apache/dolphinscheduler/issues/9937#issuecomment-1120169445
### 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 Note: The time-consuming increases as the data increases, the test time increases from 4s to 20s, and only one scheduling task is running. Troubleshooting: It is found that the t_ds_task_instance table is queried when the workflow is executed. The main time-consuming is concentrated here. If the query time can be reduced, the time-consuming can be reduced. Temporary solution: add an index to the t_ds_task_instance table (the current data volume of the t_ds_task_instance table is 200,000) ```sql CREATE INDEX t_ds_task_instance_process_instance_id_idx ON t_ds_task_instance (process_instance_id,task_code); ```` Effect: Effectively improve  ### What you expected to happen time-consuming reduction ### How to reproduce The larger the amount of data in the t_ds_task_instance table, the more time-consuming ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [ ] 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]
