Performance issue in update query

前端 未结 3 946
青春惊慌失措
青春惊慌失措 2021-02-02 02:09

I have one small doubt in query performance. Basically, I have a table with more than 1C records. sl_id is the primary key in that table. Currently, I am updating t

3条回答
  •  离开以前
    2021-02-02 02:41

    Definitely you should use WHERE IN operator. Making 200 queries is much slower than one bigger. Remember, when you sending query to database, there is additional time needed to communicate between server and DB and this will crush your performance.

提交回复
热议问题