Add analyze statements after the aggregate table queries