简体   繁体   English

通过调优提高 Oracle 中的查询性能

[英]Improve query performance in Oracle with tuning


I'm doing an ETL with a table with 100 million records where I capture the information from TERADATA and import it into ORACLE. 我正在对一个包含 1 亿条记录的表进行 ETL,我从 TERADATA 捕获信息并将其导入 ORACLE。 The process is taking too long and I want to know if there is any way to improve the performance of my query with some tuning. 该过程花费的时间太长,我想知道是否有任何方法可以通过一些调整来提高查询的性能。
 MERGE INTO TABLE_A TB USING ( select t.COLUMN_A as COLUMN_A_OLD from TABLE_B t left outer join STAGE s on s.COLUMN_B = t.COLUMN_B and s.COLUMN_C = t.COLUMN_C and s.COLUMN_D = t.COLUMN_D and s.COLUMN_E = t.COLUMN_E and s.COLUMN_F = to_date('yyyy-mm-dd 00:00:00','yyyy-mm-dd hh24:mi:ss') where t.COLUMN_F = to_date('2100-12-31 00:00:00','yyyy-mm-dd hh24:mi:ss') and s.COLUMN_C is null ) stg on ( stg.COLUMN_A_OLD = tb.COLUMN_A ) WHEN MATCHED THEN UPDATE SET TB.COLUMN_F = sysdate, TB.COLUMN_G = $$PARAMETER , TB.COLUMN_H = sysdate; commit;


Thanks.谢谢。

Have you tried something like this?你有没有尝试过这样的事情?


alter session enable parallel dml;

 merge /*+ parallel(10) */ into ….

The PARALLEL hint will enable read-parallelism, but to also enable write-parallelism you will need to either run the above ALTER SESSION command or use the hint /*+ ENABLE_PARALLEL_DML */. PARALLEL 提示将启用读并行,但要同时启用写并行,您需要运行上述 ALTER SESSION 命令或使用提示 /*+ ENABLE_PARALLEL_DML */。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM