Make update sql perform better