Some querylog optimizations.