Add 3 more SQL indexes to the Host table (#1559)

* Add 3 more SQL indexes to the Host table

These indexes on creationTime, deletionTime, and currentSponsorRegistrarId are
present on the other two EPP resource tables (Domain and Contact), and are
useful for a wide variety of operations/analytics queries.
This commit is contained in:
Ben McIlwain 2022-03-15 22:16:36 -04:00 committed by GitHub
parent 6dd6ebce75
commit 742ad0b37c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 815 additions and 705 deletions

View file

@ -47,7 +47,12 @@ import javax.persistence.AccessType;
* would prevent us from using JPA standard bootstrapping). For now, there is no obvious benefit
* doing either.
*/
indexes = {@javax.persistence.Index(columnList = "hostName")})
indexes = {
@javax.persistence.Index(columnList = "hostName"),
@javax.persistence.Index(columnList = "creationTime"),
@javax.persistence.Index(columnList = "deletionTime"),
@javax.persistence.Index(columnList = "currentSponsorRegistrarId")
})
@ExternalMessagingName("host")
@WithStringVKey
@Access(AccessType.FIELD) // otherwise it'll use the default if the repoId (property)