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

Slow login #335

Closed
norraxx opened this issue Sep 4, 2019 · 0 comments
Closed

Slow login #335

norraxx opened this issue Sep 4, 2019 · 0 comments
Assignees
Labels

Comments

@norraxx
Copy link

norraxx commented Sep 4, 2019

Problem with loging is given by method upper.

select user0_.id as id1_23_, user0_.create_time as create_t2_23_, user0_.update_time as update_t3_23_, user0_.email as email4_23_, user0_.last_login as last_log5_23_, user0_.login as login6_23_, user0_.ip as ip7_23_, user0_.steamid as steamid8_23_, user0_.user_agent as user_age9_23_, user0_.password as passwor10_23_ from login user0_ where upper(user0_.login)=upper('norraxx') or upper(user0_.email)=upper('norraxx')

https://github.com/FAForever/faf-java-api/blob/develop/src/main/java/com/faforever/api/user/UserRepository.java#L17

I would say that it could be speedup by CREATE INDEX login_helper_idx ON login (login, email)

@norraxx norraxx self-assigned this Sep 4, 2019
@norraxx norraxx added the bug label Sep 4, 2019
norraxx pushed a commit that referenced this issue Sep 4, 2019
This is no longer required as all columns use CI collation now (see FAForever/db#194)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant