Answer the question
In order to leave comments, you need to log in
An event that is called every second. This is fine?
To automatically delete sessions, I created an event that is called every second.
Is this normal in terms of resource consumption?
I really need comments from experienced people on this, please!
CREATE EVENT delete_old_records
ON SCHEDULE EVERY 1 SECOND
DO
DELETE FROM sessions WHERE NOW() >= session_lifetime;
Answer the question
In order to leave comments, you need to log in
It is not very clear what sessions are we talking about? PHP. in the application?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question