| Irfan |
Posted: Apr 28, 2008 02:13:16 AM |
Total Post: 29
Joined: Nov, 2005
|
Hi,
I have a table data_all having abt 5000000 records.
I want to fetch about 3200000 records from this table to table name report.
Will the insert into report select * from data_all where (condition1) work faster than
create table report as(select *from data_all where(condition1))?
Thanks
|
|
|
GOPU |
| Posted: Apr 28, 2008 02:18:20 AM | |
|
Total Post: 327
Joined: Apr, 2008
|
I dont think it is having much difference ?
|
|
|
|
|
Murtuja |
| Posted: Apr 28, 2008 02:53:47 AM | |
|
Total Post: 857
Joined: Jan, 2006
|
Hi,
You can improve performance using "nologging" and "parallel" options with CTAS method.
See this link
http://www.orafaq.com/wiki/CTAS
|
|
|
|
|
http://shaharear.blogspot.com |
| Posted: Apr 28, 2008 07:05:26 AM | |
|
Total Post: 127
Joined: Apr, 2008
|
you may use it ........
create table report as select *from data_all where condition nologin;
|
|
|
|
|
Gitesh |
| Posted: Apr 29, 2008 12:50:32 AM | |
|
Total Post: 322
Joined: May, 2005
|
use /*+append*/ hint in insert statement or use direct path insert. Both are faster. If you have standby database then don't use NOLOGGING clause it will do logical corruption in standby database.
|
|
|
|
|
Murtuja |
| Posted: Apr 29, 2008 04:58:22 AM | |
|
Total Post: 857
Joined: Jan, 2006
|
Hi Gitesh,
Thanks for excellent answer.
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |