change some sql to temporary not get cost