elunez / eladmin

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

Add Index on log.create_time to Accelerate Query #287

Closed wtune closed 4 years ago

wtune commented 4 years ago

Problem

Missing index on table log column create_time might make the underlying query issued via LogRepository#findIp slow. Since this query try to find log in a certain time interval.

https://github.com/elunez/eladmin/blob/7272f88719987503d21afb53d946c4b358278e8e/eladmin-logging/src/main/java/me/zhengjie/repository/LogRepository.java#L25

Possible Solution

Add Index on log.create_time

elunez commented 4 years ago

后续修改