clearSql() empties entries from the SQL logging table earlier than the current timestamp. This allows the log to be cleared while the logging system is still in use.
Because the method uses a 'delete from' methodology, and that the logging system may accumulated substantial volumes of data
- The command may time out if run in a browser
- The command may place the system under a heavy load, and there may be transactional timeout issues on some DBMS
An alternative methodology is:
- Stop the logging system
- Use a 'truncate table' command
- restart the logging system