From 31a446be7f9ef35d1895e9914121f7029321af09 Mon Sep 17 00:00:00 2001 From: wtune <59522871+wtune@users.noreply.github.com> Date: Fri, 13 Mar 2020 14:37:06 +0800 Subject: [PATCH] Add Index on dict.name to Accelerate Query Add Index on dict.name to Accelerate Query --- .../main/java/me/zhengjie/modules/system/domain/Dict.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dict.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dict.java index cbdde2c4..e21d0677 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dict.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dict.java @@ -18,7 +18,8 @@ import java.util.List; @Entity @Getter @Setter -@Table(name="dict") +@Table(name="dict", + indexes={@Index(name = "dict_name", columnList = "name")}) public class Dict implements Serializable { @Id @@ -42,4 +43,4 @@ public class Dict implements Serializable { private List dictDetails; public @interface Update {} -} \ No newline at end of file +}