ouyangyewei opened a new issue #8216:
URL: https://github.com/apache/dolphinscheduler/issues/8216


   ### 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
   
   The implementation of the `QueryTaskInstanceListPaging` API is not a real 
paging query, but actually performs paging operations in memory after querying 
all records from the database. When the number of records in the 
`t_ds_task_instance` table reaches **millions**, even if _**it is an index 
query**_, the SQL query takes **_sub-minutes_**!
   
   ##### 1. the number of records in the `t_ds_task_instance` table reaches 
millions
   
![image](https://user-images.githubusercontent.com/3365997/151304263-65acba82-b173-423f-a242-9d67ecb8dde8.png)
   
   ##### 2. the SQL query takes more than 36s !
   
![image](https://user-images.githubusercontent.com/3365997/151304755-30b07207-48ce-455e-b58a-e9fb79cf7b16.png)
   
   ##### 3. SQL is already an indexed query
   
![image](https://user-images.githubusercontent.com/3365997/151305126-c0887223-f232-4f89-ae57-49d2e54e806c.png)
   
   
   ### Use case
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### 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]


Reply via email to