You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/04/24 15:45:47 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #30762: Index on task instance

uranusjr commented on code in PR #30762:
URL: https://github.com/apache/airflow/pull/30762#discussion_r1175481062


##########
airflow/models/taskinstance.py:
##########
@@ -450,6 +450,7 @@ class TaskInstance(Base, LoggingMixin):
         Index("ti_dag_run", dag_id, run_id),
         Index("ti_state", state),
         Index("ti_state_lkp", dag_id, task_id, run_id, state),
+        Index("ti_state_incl_start_date", dag_id, task_id, state, postgresql_include=["start_date"]),

Review Comment:
   Would be a good idea to add a comment here describing what queries this would concretely improve over existing indexes, since it is not immediately obvious.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org