Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> Is insert faster?

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: Is insert faster?
 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

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi327
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software