Refactorings in preparation for flushing the execution plan cache