Add an index on Host.host_name column (#1510)

* Add an index on Host.host_name column

This field is queried during host creation and needs an index to speed
up the query.

Since Hibernate does not explicitly refer to indexes, we can change the
code and schema in one PR.
This commit is contained in:
Weimin Yu
2022-02-03 15:57:15 -05:00
committed by GitHub
parent 28d41488b1
commit e2bd72a74e
7 changed files with 600 additions and 573 deletions
@@ -34,6 +34,9 @@ import javax.persistence.AccessType;
@ReportedOn
@Entity
@javax.persistence.Entity(name = "Host")
@javax.persistence.Table(
name = "Host",
indexes = {@javax.persistence.Index(columnList = "hostName")})
@ExternalMessagingName("host")
@WithStringVKey
@Access(AccessType.FIELD) // otherwise it'll use the default if the repoId (property)