Add index on `hostname` column of `job` table
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 472
Description
### Description
Add an index on the `hostname` column of the `job` table.
### Use case/motivation
Currently, running CLI healthchecks for the scheduler or dag processor can take a long time. This is particularly relevant in a setup where hostnames are dynamically generated / rotated frequently, such as in k8s deploys. The addition of the `hostname` index would help improve the performance of those CLI-based healthchecks. There are likely other areas which would benefit from this index addition.
### Related issues
The addition of this feature would narrow the implementation work required for https://github.com/apache/airflow/issues/62518, but these two issues are functionally distinct.
### Are you willing to submit a PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
Assessment
This issue has not been assessed yet.