[英]Insert 200 Million Rows from Staging Table to another Table in Same SQL Database
不炸毀事務日志的最快方法是什么?
作為select的CTAS-create表可能是在任何數據庫上執行此類操作的最快方法。
作為選擇語句,CTAS或create table作為一個事務完成。
Create table new_table
as
select * from old_table
如果要從登台表插入基表,則這可能是最快的:
insert /*+ append */ into base_table
values(select * from staging_table) ;
使用append
提示可以生成最少的日志記錄,因此必須立即執行備份。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.