sortega opened a new pull request, #60886:
URL: https://github.com/apache/airflow/pull/60886

     Add index `ti_dag_version_id` on `task_instance.dag_version_id` column to 
improve query performance.                                                      
                                                                                
                                                                       
                                                                                
                                                                                
                                                                                
                                                                      
     The `dag_version_id` column was added in migration 
`0047_3_0_0_add_dag_versioning.py` but no index was created, causing full table 
scans when filtering or joining on this column. This affects:                   
                                                                                
              
                                                                                
                                                                                
                                                                                
                                                                      
     - UI grid endpoint (`/ui/dags/{dag_id}/grid/...`) filtering task instances 
by `dag_version_id`                                                             
                                                                                
                                                                      
     - Any query joining `task_instance` with `dag_version`                     
                                                                                
                                                                                
                                                                      
                                                                                
                                                                                
                                                                                
                                                                      
     closes #60883                                                              
                                                                                
                                                                                
                                                                      
                                                                                
                                                                                
                                                                                
                                                                      
     ---                                                                        
                                                                                
                                                                                
                                                                      
                                                                                
                                                                                
                                                                                
                                                                      
     ##### Was generative AI tooling used to co-author this PR?                 
                                                                                
                                                                                
                                                                      
                                                                                
                                                                                
                                                                                
                                                                      
     - [X] Yes                                                                  
                                                                                
                                                                                
                                     
                                                                                
                                                                                
                                                                                
                                                                      
     🤖 Drafted with Claude Code following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
                                                                                
                                                           
                                                                                
                                                                                
                                                                                
                                                                  


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