Fix for issue #14, By experimenting with 2010-05-28.log, it produces 6092 query instead of 4580. Huge improvement :)