Postgres のパフォーマンスに関する質問があります。約 500K 行のテキストのテーブルがあります。グローバルな検索と置換ルーチンを実行する必要があります。これら 2 つの UPDATE ステートメントのうちの 1 つは、他のステートメントよりも大幅に高速でしょうか? それとも、パフォーマンスはかなり似ていますか?
update mytable
set mycolumn = regexp_replace(mycolumn, 'ReplaceMe','WithMe', 'g');
update mytable
set mycolumn = regexp_replace(mycolumn, 'ReplaceMe','WithMe', 'g')
where mycolumn like '%ReplaceMe%';