私はこの声明を持っています:
update new_table t2
set t2.creation_date_utc =
(select creation_date from old_table t1 where t2.id = t1.id)
where exists
(select 1 from old_table t1 where t2.id = t1.id);
説明計画によると、コストは 150959919 です。説明計画では、合計コストが 3000 程度の完全なテーブル アクセスが示され、更新には基本的に無限のコストがかかります。実行すると、実際に永遠に続くようです。
参考までに、これらのテーブルにはそれぞれ 30 万行以下しかありません。
さらに、このクエリ。
select
(select creation_date from old_table t1 where t2.id = t1.id)
from new_table t2;
基本的に即日終了。
これの原因は何ですか?