Support long queries when pre-calculate data