removed mysql specific sql, added indexes for safe file reloading
made it safe to load a log file multiple times