Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: why CTAS faster than Insert select?

Re: why CTAS faster than Insert select?

From: linda <linglipeng_at_yahoo.com>
Date: 30 Mar 2005 12:06:05 -0800
Message-ID: <1112213165.480529.61710@o13g2000cwo.googlegroups.com>


Connor,

Yes, the Insert is in /*+ APPEND */ mode. When you force session PDML, it seems that it does INSERTs in APPEND mode automatically. I did test manually putting /*+ APPEND */ as well, it doesn't make a difference in terms of timing when comparing to CTAS. I used the runstats_pkg to measure the latch difference, it's very comparable (96%), but response time almost double. The execution plan also the same (hash joins, index FFS). Some how I guess Oracle is executing different code path for CTAS and Insert /*+ APPEND */ as select. Even though it's all parallelized and nologging, one path is significantly faster than the other. If it's really true, then I think Oracle should optimize the path for Insert Select as well.

Thanks,
Linda Received on Wed Mar 30 2005 - 14:06:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US