winskin opened a new issue, #9937: URL: https://github.com/apache/dolphinscheduler/issues/9937
### 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 说明:耗时随着数据增加而增加,测试耗时从4s增加到20s,只有一个调度任务在跑。 排查:发现是工作流执行时会查询t_ds_task_instance表,主要的耗时集中在这里,如果能减少查询时间即可降低耗时。 临时解决:t_ds_task_instance表增加索引(当前t_ds_task_instance表数据量为20万) ```sql CREATE INDEX t_ds_task_instance_process_instance_id_idx ON t_ds_task_instance (process_instance_id,task_code); ``` 效果:有效提升  ### What you expected to happen 耗时降低 ### How to reproduce t_ds_task_instance表数据量越大,耗时增加越多 ### 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]
