40列のテーブル「A」があります。'A' の特定の 20 列のデータを、それらの 20 列を持つ別のテーブル 'B' にコピーする必要があります。約 3 ~ 1000 万のレコードがあります。PLSQLでこれを行う最も効率的な方法は何ですか。
1570 次
2 に答える
1
"daily table B will be truncated and new data will be inserted into it from A."
Okay, so the most efficient way to do this is not to do it. Use a materialized view instead; a materialized view log on table A will allow you to capture incremental changes and apply them daily, or at any other window you like. Find out more.
Compared to that approach using handrolled PL/SQL - or even pure SQL - is laughably inefficient.
于 2013-07-11T08:03:59.173 に答える