S
S
Steve2021-12-29 11:33:28
MySQL
Steve, 2021-12-29 11:33:28

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

1 answer(s)
N
Nikolai Turnaviotov, 2022-02-02
@foxmuldercp

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 question

Ask a Question

731 491 924 answers to any question