potiuk commented on PR #60166: URL: https://github.com/apache/airflow/pull/60166#issuecomment-3719187284
> IMO one simple fetch call is way better than 5 sub fetch calls happening in those delete calls. Also, if there are no stale dags, then those 5 DB calls are being saved as well, isn't it? I think sqlalchemy makes into a single fetch with nested query (you can take a look by enabling sqlalchemy query logs) - so @uranusjr is I think right it saves fetches, It does not save queries done by the single fetch and it does not change optiomisations when there are no stale dags - (I guess the DELETE query internally will be run anyway first and the delete will also not happen if delete is not returning anything) - you can likely see it by running explain plan on those queries. But I think in this case it's just premature optimisation and I would opt for cleaner and unified code in this case. -- 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]
