Hi @ahmed salah ,
Please provide tables and data related to the update statement so that we can perform some tests.
In addition, when publishing optimized query posts, please publish the execution plan and index information together.
Whether there is an index on the m. ZLC column, if not, you can try to build an index on the column first.
When in is inefficient, you can also replace in with exists, But the use of in or exists depends on the size of the inner and outer tables.
Regards
Echo
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.