The select statement inside of this update query just takes around 4 seconds. But the update part takes a huge amount of time. The update here involves only 100.000 rows, wh