update x set y = null takes a long time

后端 未结 5 761
孤城傲影
孤城傲影 2021-01-04 03:59

At work, I have a large table (some 3 million rows, like 40-50 columns). I sometimes need to empty some of the columns and fill them with new data. What I did not expect is

5条回答
  •  一个人的身影
    2021-01-04 04:20

    Is column Y indexed? It could be that setting the column to null means Oracle has to delete from the index, rather than just update it. If that's the case, you could drop and rebuild it after updating the data.

    EDIT:

    Is it just column Y that exhibits the issue, or is it independent of the column being updated? Can you post the table definition, including constraints?

提交回复
热议问题