potiuk commented on code in PR #30827:
URL: https://github.com/apache/airflow/pull/30827#discussion_r1175010626
##########
airflow/models/dagrun.py:
##########
@@ -143,6 +143,15 @@ class DagRun(Base, LoggingMixin):
UniqueConstraint("dag_id", "execution_date",
name="dag_run_dag_id_execution_date_key"),
UniqueConstraint("dag_id", "run_id", name="dag_run_dag_id_run_id_key"),
Index("idx_last_scheduling_decision", last_scheduling_decision),
+ Index(
Review Comment:
This is an interesting idea to add partial index here, Likely the improvment
in your case is because the whole index takes too much memory of your server
and gest swapped out. I do not know that much about thos partial indexes but it
does seem like a legitimate optimisiation that might improve one of the most
frequent queries scheduler runs,
I do not see an immediate side-effect of that one (and regarding the
migration - I think you should follow the regular CONTRIBUTORS.rst alembic
guide:
https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#metadata-database-updates
but I think I'd love others to comment if they also see any problem with
such an optimisation?
--
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]