Skip to content

Commit

Permalink
optimize query in GET /u/<id> (= in place of IN)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui authored Apr 1, 2022
1 parent 5ecba25 commit 2ba4b1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blueprints/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ async def profile_select(id):
user_data = await glob.db.fetch(
'SELECT name, safe_name, id, priv, country '
'FROM users '
'WHERE safe_name IN (%s) OR id IN (%s) LIMIT 1',
'WHERE safe_name = %s OR id = %s LIMIT 1',
[utils.get_safe_name(id), id]
)

Expand Down

0 comments on commit 2ba4b1f

Please sign in to comment.