njnu-seafish opened a new issue, #18439: URL: https://github.com/apache/dolphinscheduler/issues/18439
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description As the data volume in the t_ds_workflow_instance table accumulates to a certain level, querying the workflow instance page for a specific project will become increasingly slow. <img width="2558" height="989" alt="Image" src="https://github.com/user-attachments/assets/c7a0cc6f-193f-4f4d-bcc9-f6c054667437" /> Similar to [ issue #18437 ](https://github.com/apache/dolphinscheduler/issues/18437), the following SQL statements require indexes to accelerate the most frequently used queries. > ALTER TABLE t_ds_workflow_instance ADD INDEX idx_project_start_end_time (project_code ASC, start_time DESC, end_time DESC); ` <select` id="queryWorkflowInstanceListPaging" resultType="org.apache.dolphinscheduler.dao.entity.WorkflowInstance"> select ...... from t_ds_workflow_instance where is_sub_workflow=0 and project_code = #{projectCode} ...... order by start_time desc, end_time desc </select> ` ### Are you willing to submit a 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]
