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 >> Reg indexes While inserting data

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: Reg indexes While inserting data
 vinnu  Posted: May 05, 2008 07:25:35 AM

 Total Post: 6
 Joined: Mar, 2008






 While inserting data, which option will be faster.The table having unique key index or the one having normal index?

If we have 2 tables.In eac tables abount 10,000 rows should be inserted.Which operation will be faster.The table which has unique key index or the table having normal index and wht is the reason beind.

 Gitesh
Posted: May 05, 2008 07:42:47 AM  

 Total Post: 322
 Joined: May, 2005






 
1) Use /*+append*/hint in insert statement
2) Use parallel insert if you have more CPU
3) Use NOLOGGING clause if you don't have standby database
4) Use bulk insert with parallel option.

Check thread here same question is being repeated and answered so many times.

 vinnu
Posted: May 05, 2008 07:59:02 AM  

 Total Post: 6
 Joined: Mar, 2008






 
My quetion is different.using which index, insert opration is faster.Is it with Unique key index or with normal index.

 Murtuja
Posted: May 05, 2008 08:31:31 AM  

 Total Post: 814
 Joined: Jan, 2006






 
Hi,

Can you please tell us why you need this type of comparision?

In normal case,we have many types of indexes defined on table and we can't avoid indexes during insert.

 Mohammed Taj
Posted: May 05, 2008 08:40:00 AM  

 Total Post: 694
 Joined: Jul, 2007






 
Unique and NON Unique both are same.
just Unique index inforce UNIQUE rows constraint on table.
It is always better to insert (massive) after DISABLE index on particular table.



 http://shaharear.blogspot.com
Posted: May 06, 2008 12:55:08 AM  

 Total Post: 79
 Joined: Apr, 2008






 
hi

while you insert data into a table which have index, the process is much slower compare to insert data into a table which have no index.

so the best way is disable all index on that table before insert.

And according to your question

Unique index is slightly more costly than non-unique index ( because of uniqueness check in every insert)

Again unique index is better than non-unique index when it use in select quarry

 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 Khokhar814
  Mohammed Taj694
  Jayanta Sur479
  Vigyan Kaushik386
  positive fanatic361
  Gitesh Trivedi322
  Gopu Gopi239
  neeraj sharma228
  Ramesh Jois226
  snehalatha p169






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