Hey people.
Just looking for a bit of advice or any opinions regarding a database / php issue.
I've just finished writing a session tracking class which re-defines the session handlers to write the session info to a MySQL database. Whilst testing this on our server, i noticed in PHPMyADMIN that main 'sessions' table had an overhead, and needed 'OPTIMIZING'. The obvious way to do this in real-time is to put an 'OPTIMIZE TABLE' query in the session_gc() function. I'm a little bit wary of this, because i've never met this before, so does anyone know of any issues surrounding the use of 'OPTIMIZE' that could prevent me using it in this context??? I know that this locks the table while it's executing, but might there be any little gremlins wating to jump out and bite me on the ass?
Thanks in advance
Robin