I have a Postgres performance question. I have a table of about 500K rows of text. I need to do some global search and replace routines. Would one of these two UPDATE statements be significantly faster than the other? Or would they be pretty similar in performance?
update mytable
set mycolumn = regexp_replace(mycolumn, 'ReplaceMe','WithMe', 'g');
update mytable
set mycolumn = regexp_replace(mycolumn, 'ReplaceMe','WithMe', 'g')
where mycolumn like '%ReplaceMe%';