I'm using postgresql 13.1. I'm trying to update one column of a table with another column of same table. It's not fast enough. It's taking forever to update as I've millions of records in the table and I've index on the column which I'm trying to update. Here is the query.
UPDATE tbl t1 SET col_1 = to_tsvector(t2.col_2) FROM tbl t2;
index on col_1. Can someone give a better solution which is fast?
Thanks in Advance.
No need for a FROM clause:
UPDATE tbl
SET col_1 = to_tsvector(col_2);