From 1d3722190827d664cfec432c14e28790aa1e7226 Mon Sep 17 00:00:00 2001 From: wtune <59522871+wtune@users.noreply.github.com> Date: Fri, 13 Mar 2020 14:03:11 +0800 Subject: [PATCH] Add Index on dept column pid Add Index on dept.pid to Accelerate Query --- .../main/java/me/zhengjie/modules/system/domain/Dept.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dept.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dept.java index 711283bb..7dcb1d66 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dept.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dept.java @@ -19,7 +19,8 @@ import java.util.Set; @Entity @Getter @Setter -@Table(name="dept") +@Table(name="dept", + indexes={@Index(name = "dept_pid", columnList = "pid")}) public class Dept implements Serializable { @Id @@ -66,4 +67,4 @@ public class Dept implements Serializable { public int hashCode() { return Objects.hash(id, name); } -} \ No newline at end of file +}