Skip to content

Commit

Permalink
feat: optimize findCertificateByName query
Browse files Browse the repository at this point in the history
- to take advantage of the new DB ndex on the name_lowercase
column

[https://vmw-jira.broadcom.net/browse/TPCF-26571]
  • Loading branch information
peterhaochen47 committed Oct 24, 2024
1 parent daef663 commit d4d5b29
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface CredentialRepository : JpaRepository<Credential?, UUID?> {
value = "select credential.uuid, credential.name, credential.name_lowercase, credential.checksum from certificate_credential " +
"left join credential_version on certificate_credential.uuid = credential_version.uuid " +
"join credential on credential.uuid = credential_version.credential_uuid " +
"where credential.name = ?1 limit 1 ",
"where credential.name_lowercase = lower(?1) limit 1 ",
nativeQuery = true,
)
fun findCertificateByName(name: String?): Credential?
Expand Down

0 comments on commit d4d5b29

Please sign in to comment.