Missing Index on sessions.hashed_refresh_token
File: sessions.py:357-371
_fetch_session_by_refresh_hash queries Session.hashed_refresh_token with WITH FOR UPDATE, but there's no visible index on this column. On every token refresh, this becomes a sequential scan against the sessions table, which grows continuously. This will become a performance cliff as the user base scales.
Missing Index on sessions.hashed_refresh_token
File: sessions.py:357-371
_fetch_session_by_refresh_hash queries Session.hashed_refresh_token with WITH FOR UPDATE, but there's no visible index on this column. On every token refresh, this becomes a sequential scan against the sessions table, which grows continuously. This will become a performance cliff as the user base scales.