generate sql during warm