Statistics queries working fully and updating table