단일 인덱스 설정

@Table(
        indexes = {
                @Index(name = "idx_tb_group_group_code", columnList = "group_code"),
                @Index(name = "idx_tb_group_group_name", columnList = "group_name")
        }
)

인덱스 확인

 

동작 확인

 

 

다중 인덱스 설정

@Table(
        indexes = {
                @Index(name = "idx_tb_group_group", columnList = "group_name, group_desc")
        }
)



@Column(name = "group_name", nullable = false)
private String groupName;

@Column(name = "group_desc")
private String groupDescription;

 

 

 

'Database > JPA' 카테고리의 다른 글

[JPA] open-in-view 경고  (0) 2024.12.06
[JPA] Data too long for column 문자열 길이 이슈  (0) 2024.06.17
JPA 유니크(UNIQUE)  (0) 2024.06.05
JPA 연동 에러  (0) 2024.05.27

+ Recent posts