login/logout update for user connecting and disconnecting on mysql

Andrew Beni
Added 7 months ago

looking at the mysql running query we see a lot of

update tig_users set online_status = greatest(online_status - 1, 0), last_logout = CURRENT_TIMESTAMP where sha1_user_id = sha1(lower( NAME_CONST('_user_id',_utf8'' COLLATE 'utf8_general_ci')))
update tig_users set online_status = online_status + 1, last_login = CURRENT_TIMESTAMP
where sha1_user_id = sha1(lower(NAME_CONST('_user_id',_utf8'' COLLATE 'utf8_general_ci')))    

are this info used only for stats purpose? Is possible to disable these queries that generate a lot of writes on the DB? There is a flag in the config for this or must be overwritten the stored procedure that does it? Can we safely remove this queries?

Replies (1)

Added by Wojciech Kapcia TigaseTeam 7 months ago

It's used only for statistics currently. There is no flag but you should be able to safely remove them from stored procedures.