elunez / eladmin

eladmin jpa 版本:项目基于 Spring Boot 2.6.4、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由
https://eladmin.vip/demo
Apache License 2.0
21.31k stars 7.35k forks source link

Add Index on role.name to Accelerate Query #293

Closed wtune closed 4 years ago

wtune commented 4 years ago

Problem

Missing index on table role column name might make the underlying query issued via RoleServiceImpl#create and RolseServiceImpl#update slow. Since this query try to find role by its name.

https://github.com/elunez/eladmin/blob/286a48368f6a1899d953b57c75b4f2b38d8f93a2/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java#L83

https://github.com/elunez/eladmin/blob/286a48368f6a1899d953b57c75b4f2b38d8f93a2/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java#L96

Possible Solution

Add Index on role.name

elunez commented 4 years ago

后续修改