tirkarthi commented on issue #62027:
URL: https://github.com/apache/airflow/issues/62027#issuecomment-3909285267

   This will also fix https://github.com/apache/airflow/issues/61212 which is 
similar where are multiple joins to the same query. Some of the things we 
noticed in our testing but yet to find any solution in our setup using mysql 
8.x.
   
   1. `TaskInstance.start_date` is not indexed by default but the UI by default 
sorts by it on load 
`http://localhost:8000/api/v2/dags/~/dagRuns/~/taskInstances?limit=10&offset=0&order_by=-start_date&order_by=-run_after`
 .
   2. `TaskInstance.id` is a primary key which is a UUID. UUID is not a native 
type in mysql but is stored by varchar(32). Postgres has native UUID support. 
Ref https://stackoverflow.com/questions/2365132/uuid-performance-in-mysql .
   3. Removing the nested joins of same table and removing sorting had greatly 
improved performance but I was not able to update the relevant SQLAlchemy parts 
in the API endpoint to get there. Also sorting is an important element where 
users want to know the recent task instances which we are yet to tackle.


-- 
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