njnu-seafish opened a new pull request, #18438:
URL: https://github.com/apache/dolphinscheduler/pull/18438
<!--Thanks very much for contributing to Apache DolphinScheduler, we are
happy that you want to help us improve DolphinScheduler! -->
## Was this PR generated or assisted by AI?
NO
## Purpose of the pull request
close #18437
## Brief change log
The queryStreamTaskInstanceListPaging interface is rarely used, so we won't
add extra indexes for it. After all, adding indexes does come with side effects.
However, since the queryTaskInstanceListPaging interface for batch tasks is
frequently used, we have added the index idx_project_submit_time (project_code
ASC, submit_time DESC) to accelerate the queries.
## Verify this pull request
After adding the following index to the database,
> ALTER` TABLE `t_ds_task_instance` ADD INDEX idx_project_submit_time
(project_code ASC, submit_time DESC);
----- The execution of the following SQL takes about 0.073 seconds
SELECT id, NAME, task_type, workflow_instance_id, workflow_instance_name,
project_code, task_code, task_definition_version, state, submit_time,
start_time, end_time, HOST, execute_path, log_path, alert_flag,
retry_times, pid, app_link,
flag, retry_interval, max_retry_times, task_instance_priority,
worker_group, environment_code, executor_id, executor_name,
first_submit_time, delay_time, task_params, var_pool, dry_run,
task_group_id, cpu_quota, memory_max, task_execute_type
FROM t_ds_task_instance
WHERE project_code = 175568922056192
ORDER BY submit_time DESC
LIMIT 10 OFFSET 0;
## Pull Request Notice
[Pull Request
Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
If your pull request contains incompatible change, you should also add it to
`docs/docs/en/guide/upgrade/incompatible.md`
--
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]