Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化sys_login_log中的索引 #76

Open
wtune opened this issue Mar 20, 2020 · 0 comments
Open

优化sys_login_log中的索引 #76

wtune opened this issue Mar 20, 2020 · 0 comments

Comments

@wtune
Copy link

wtune commented Mar 20, 2020

问题

表sys_login_log中缺少一些需要的索引,通过测试,我们发现加上这些索引可以极大地提高相关查询的性能(高达95%),需要添加的索引和影响的查询分别如下所示:

1.sys_login_log.create_time

LoginLogService#getLoginLogs中可以看出在获取登录日志时会查询在一个时间段内的登录日志,即查询create_time在一个范围内的登录日志,因此给create_time添加索引可以极大地提升该类查询的性能。

解决方法

添加缺少的索引
sys_login_log.create_time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant