aksdevs commented on PR #62152:
URL: https://github.com/apache/airflow/pull/62152#issuecomment-3953353258

   @pierrejeambrun From the analysis and the limited testing I’ve done so far, 
the sargable rewrite already shows measurable efficiency improvement.
   
   Before I proceed further, I wanted to check: would you like me to continue 
investing effort in this direction (for example, deeper benchmarking, checking 
other possible contributors to the slowness, edge cases, etc.), or would you 
prefer to close this in favor of #62158?
   
   We could rewrite the date filters to avoid wrapping columns in functions. 
For example, replace: func.coalesce(DagRun.start_date, current_time) >= 
start_date with: or_(DagRun.start_date >= start_date, 
DagRun.start_date.is_(None))
   
   This lets the DB use indexes on start_date/end_date.


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