On 2020-05-13 12:13:20 +0400, otar shavadze wrote: > postgres version 12 > I have very simple update query, like this: > > update my_table > set > col = NULL > where > col IS NOT NULL; > > my_table contains few million rows, col is indexed column You might want to drop the index before doing this. You obviously won't need the index afterwards and the database may be able to use HOT updates if there is no index on the column (but that depends on the amount of unused space in each block). hp -- _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@xxxxxx | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!"
Attachment:
signature.asc
Description: PGP signature