SlowCycle.de » Garbage Collection mit MySql Event Schedule

Garbage Collection mit MySql Event Schedule


Simple Garbage Collection mit MySql Event Schedule



DROP EVENT IF EXISTS GARBAGE_COLLECTION;
DELIMITER $$

CREATE EVENT GARBAGE_COLLECTION
    ON SCHEDULE EVERY 30 SECOND DO
    BEGIN
        DELETE FROM session where expire < UNIX_TIMESTAMP(NOW());
    END $$

DELIMITER ;

1 Kommentar

  • 1. Christmas Gifts 2016 schrieb am 11th November 2016 um 10:45 :

    I do not even know the way I ended up here, however I thought this post was good. I do not recognise who you’re but definitely you’re going to a well-known blogger in the event you aren’t already. Cheers!

Gib deinen Kommentar ab

XHTML: Du kannst folgende Tags für deinen Kommentar nutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>