CleanUp.
Historical query optimization.