move the call to get_a_url out of timer control as it may involve DB operation which could last very long
tune SQL to make it lightweight